@@ -102,12 +102,12 @@ func newTestDialer() *testDialer {
102
102
// conn := d.waitForNextDialing(true, false)
103
103
// assertReceived(t, // t is *testing.T
104
104
// conn.waitForNextWrite(true, ""),
105
- // "[\ "tag_name\ ",1482493046,{\ "foo\":\ "bar\ "},{}]" )
105
+ // `[ "tag_name",1482493046,{"foo": "bar"},{}]` )
106
106
//
107
107
// f.EncodeAndPostData("something_else", time.Unix(1482493050, 0), map[string]string{"bar": "baz"})
108
108
// assertReceived(t, // t is *testing.T
109
109
// conn.waitForNextWrite(true, ""),
110
- // "[\ "something_else\ ",1482493050,{\ "bar\":\ "baz\ "},{}]" )
110
+ // `[ "something_else",1482493050,{"bar": "baz"},{}]` )
111
111
//
112
112
// In this example, the 1st connection dialing succeeds but the 1st attempt to write the
113
113
// message is discarded. As the logger discards the connection whenever a message
@@ -117,7 +117,7 @@ func newTestDialer() *testDialer {
117
117
// using assertReceived() to make sure the logger encodes the messages properly.
118
118
//
119
119
// Again, the example above is using async mode thus, calls to f and conn are running in
120
- // the same goroutine. However in sync mode, all calls to f.EncodeAndPostData() as well
120
+ // the same goroutine. However, in sync mode, all calls to f.EncodeAndPostData() as well
121
121
// as the logger initialization shall be placed in a separate goroutine or the code
122
122
// allowing the dialing and writing attempts (eg. waitForNextDialing() & waitForNextWrite())
123
123
// would never be reached.
@@ -487,14 +487,14 @@ func TestPostWithTime(t *testing.T) {
487
487
conn := d .waitForNextDialing (true , false )
488
488
assertReceived (t ,
489
489
conn .waitForNextWrite (true , "" ),
490
- "[ \ " acme.tag_name\ " ,1482493046,{\ " foo\" : \ " bar\ " },{}]" )
490
+ `[ "acme.tag_name",1482493046,{"foo": "bar"},{}]` )
491
491
492
492
assertReceived (t ,
493
493
conn .waitForNextWrite (true , "" ),
494
- "[ \ " acme.tag_name\ " ,1482493050,{\ " fluentd\" : \ " is awesome\ " },{}]" )
494
+ `[ "acme.tag_name",1482493050,{"fluentd": "is awesome"},{}]` )
495
495
assertReceived (t ,
496
496
conn .waitForNextWrite (true , "" ),
497
- "[ \ " acme.tag_name\ " ,1634263200,{\ " welcome\" : \ " to use\ " },{}]" )
497
+ `[ "acme.tag_name",1634263200,{"welcome": "to use"},{}]` )
498
498
})
499
499
}
500
500
}
@@ -538,7 +538,7 @@ func TestReconnectAndResendAfterTransientFailure(t *testing.T) {
538
538
conn := d .waitForNextDialing (true , false )
539
539
assertReceived (t ,
540
540
conn .waitForNextWrite (true , "" ),
541
- "[ \ " tag_name\ " ,1482493046,{\ " foo\" : \ " bar\ " },{}]" )
541
+ `[ "tag_name",1482493046,{"foo": "bar"},{}]` )
542
542
543
543
// The next write will fail and the next connection dialing will be dropped
544
544
// to test if the logger is reconnecting as expected.
@@ -549,7 +549,7 @@ func TestReconnectAndResendAfterTransientFailure(t *testing.T) {
549
549
conn = d .waitForNextDialing (true , false )
550
550
assertReceived (t ,
551
551
conn .waitForNextWrite (true , "" ),
552
- "[ \ " tag_name\ " ,1482493050,{\ " fluentd\" : \ " is awesome\ " },{}]" )
552
+ `[ "tag_name",1482493050,{"fluentd": "is awesome"},{}]` )
553
553
})
554
554
}
555
555
}
0 commit comments