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