From 04bf81fd99eb2089ac3bb0496d0c8bce68488a05 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 10 Jan 2022 15:37:48 +1100 Subject: [PATCH] fix(responsemanager): make TestCancellationQueryInProgress less strict --- responsemanager/responsemanager_test.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/responsemanager/responsemanager_test.go b/responsemanager/responsemanager_test.go index b29c04b6..443e2408 100644 --- a/responsemanager/responsemanager_test.go +++ b/responsemanager/responsemanager_test.go @@ -136,15 +136,10 @@ func TestCancellationQueryInProgress(t *testing.T) { td.assertRequestCleared() tracing := td.collectTracing(t) - require.ElementsMatch(t, []string{ - "processRequests(0)", - "response(0)->executeTask(0)->processBlock(0)->loadBlock(0)", - "response(0)->executeTask(0)->processBlock(0)->sendBlock(0)->processBlockHooks(0)", - "response(0)->executeTask(0)->processBlock(1)->loadBlock(0)", - "response(0)->executeTask(0)->processBlock(1)->sendBlock(0)", - "response(0)->abortRequest(0)", - "processRequests(1)", - }, tracing.TracesToStrings()) + traceStrings := tracing.TracesToStrings() + require.Contains(t, traceStrings, "processRequests(0)") + require.Contains(t, traceStrings, "response(0)->abortRequest(0)") + require.Contains(t, traceStrings, "processRequests(1)") message0Span := tracing.FindSpanByTraceString("processRequests(0)") message1Span := tracing.FindSpanByTraceString("processRequests(1)") responseSpan := tracing.FindSpanByTraceString("response(0)")