From 6e390f3b99011fd39c89df35e50d748265563d93 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 8 Dec 2022 18:18:06 -0800 Subject: [PATCH] lib/querytracer: fix remaining tests after 49ebc488094bfe637c01a56e7c39c4af08a6f731 --- lib/querytracer/tracer_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/querytracer/tracer_test.go b/lib/querytracer/tracer_test.go index 2d3dc7d608..a20fd6a14c 100644 --- a/lib/querytracer/tracer_test.go +++ b/lib/querytracer/tracer_test.go @@ -109,9 +109,9 @@ func TestTraceAddJSON(t *testing.T) { } qt.Done() s := qt.String() - sExpected := `- 0ms: parent + sExpected := `- 0ms: : parent | - 0ms: first_line -| - 0ms: child +| - 0ms: : child | | - 0ms: foo | - 0ms: last_line ` @@ -120,9 +120,9 @@ func TestTraceAddJSON(t *testing.T) { } jsonS := qt.ToJSON() - jsonSExpected := `{"duration_msec":0,"message":"parent","children":[` + + jsonSExpected := `{"duration_msec":0,"message":": parent","children":[` + `{"duration_msec":0,"message":"first_line"},` + - `{"duration_msec":0,"message":"child","children":[` + + `{"duration_msec":0,"message":": child","children":[` + `{"duration_msec":0,"message":"foo"}]},` + `{"duration_msec":0,"message":"last_line"}]}` if !areEqualJSONTracesSkipDuration(jsonS, jsonSExpected) { @@ -137,7 +137,7 @@ func TestTraceMissingDonef(t *testing.T) { qtChild.Printf("child printf") qt.Printf("another parent printf") s := qt.String() - sExpected := `- 0ms: parent: missing Tracer.Done() call + sExpected := `- 0ms: : parent: missing Tracer.Done() call | - 0ms: parent printf | - 0ms: child: missing Tracer.Done() call | | - 0ms: child printf