@@ -105,12 +105,12 @@ func newTestDialer() *testDialer {
105
105
// conn := d.waitForNextDialing(true, false)
106
106
// assertReceived(t, // t is *testing.T
107
107
// conn.waitForNextWrite(true, ""),
108
- // "[\ "tag_name\ ",1482493046,{\ "foo\":\ "bar\ "},{}]" )
108
+ // `[ "tag_name",1482493046,{"foo": "bar"},{}]` )
109
109
//
110
110
// f.EncodeAndPostData("something_else", time.Unix(1482493050, 0), map[string]string{"bar": "baz"})
111
111
// assertReceived(t, // t is *testing.T
112
112
// conn.waitForNextWrite(true, ""),
113
- // "[\ "something_else\ ",1482493050,{\ "bar\":\ "baz\ "},{}]" )
113
+ // `[ "something_else",1482493050,{"bar": "baz"},{}]` )
114
114
//
115
115
// In this example, the 1st connection dialing succeeds but the 1st attempt to write the
116
116
// message is discarded. As the logger discards the connection whenever a message
@@ -120,7 +120,7 @@ func newTestDialer() *testDialer {
120
120
// using assertReceived() to make sure the logger encodes the messages properly.
121
121
//
122
122
// Again, the example above is using async mode thus, calls to f and conn are running in
123
- // the same goroutine. However in sync mode, all calls to f.EncodeAndPostData() as well
123
+ // the same goroutine. However, in sync mode, all calls to f.EncodeAndPostData() as well
124
124
// as the logger initialization shall be placed in a separate goroutine or the code
125
125
// allowing the dialing and writing attempts (eg. waitForNextDialing() & waitForNextWrite())
126
126
// would never be reached.
@@ -495,14 +495,14 @@ func TestPostWithTime(t *testing.T) {
495
495
conn := d .waitForNextDialing (true , false )
496
496
assertReceived (t ,
497
497
conn .waitForNextWrite (true , "" ),
498
- "[ \ " acme.tag_name\ " ,1482493046,{\ " foo\" : \ " bar\ " },{}]" )
498
+ `[ "acme.tag_name",1482493046,{"foo": "bar"},{}]` )
499
499
500
500
assertReceived (t ,
501
501
conn .waitForNextWrite (true , "" ),
502
- "[ \ " acme.tag_name\ " ,1482493050,{\ " fluentd\" : \ " is awesome\ " },{}]" )
502
+ `[ "acme.tag_name",1482493050,{"fluentd": "is awesome"},{}]` )
503
503
assertReceived (t ,
504
504
conn .waitForNextWrite (true , "" ),
505
- "[ \ " acme.tag_name\ " ,1634263200,{\ " welcome\" : \ " to use\ " },{}]" )
505
+ `[ "acme.tag_name",1634263200,{"welcome": "to use"},{}]` )
506
506
})
507
507
}
508
508
}
@@ -546,7 +546,7 @@ func TestReconnectAndResendAfterTransientFailure(t *testing.T) {
546
546
conn := d .waitForNextDialing (true , false )
547
547
assertReceived (t ,
548
548
conn .waitForNextWrite (true , "" ),
549
- "[ \ " tag_name\ " ,1482493046,{\ " foo\" : \ " bar\ " },{}]" )
549
+ `[ "tag_name",1482493046,{"foo": "bar"},{}]` )
550
550
551
551
// The next write will fail and the next connection dialing will be dropped
552
552
// to test if the logger is reconnecting as expected.
@@ -557,7 +557,7 @@ func TestReconnectAndResendAfterTransientFailure(t *testing.T) {
557
557
conn = d .waitForNextDialing (true , false )
558
558
assertReceived (t ,
559
559
conn .waitForNextWrite (true , "" ),
560
- "[ \ " tag_name\ " ,1482493050,{\ " fluentd\" : \ " is awesome\ " },{}]" )
560
+ `[ "tag_name",1482493050,{"fluentd": "is awesome"},{}]` )
561
561
})
562
562
}
563
563
}
0 commit comments