diff --git a/core/services/ocrcommon/telemetry_test.go b/core/services/ocrcommon/telemetry_test.go index ae682524e0f..f04a216e139 100644 --- a/core/services/ocrcommon/telemetry_test.go +++ b/core/services/ocrcommon/telemetry_test.go @@ -659,18 +659,15 @@ func TestGetPricesFromBridgeTaskByOrder(t *testing.T) { require.Equal(t, float64(0), benchmarkPrice) require.Equal(t, float64(0), bid) require.Equal(t, float64(0), ask) - require.Equal(t, 1, logs.Len()) - require.Contains(t, logs.All()[0].Message, "cannot parse enhanced EA telemetry") + require.Equal(t, 0, logs.Len()) tt := trrsMercuryV1[:2] getPricesFromBridgeTask(lggr, trrsMercuryV1[0], tt, 1) - require.Equal(t, 2, logs.Len()) - require.Contains(t, logs.All()[1].Message, "cannot parse enhanced EA telemetry bid price, task is nil") + require.Equal(t, 0, logs.Len()) tt = trrsMercuryV1[:3] getPricesFromBridgeTask(lggr, trrsMercuryV1[0], tt, 1) - require.Equal(t, 3, logs.Len()) - require.Contains(t, logs.All()[2].Message, "cannot parse enhanced EA telemetry ask price, task is nil") + require.Equal(t, 0, logs.Len()) trrs2 := pipeline.TaskRunResults{ pipeline.TaskRunResult{ @@ -710,10 +707,10 @@ func TestGetPricesFromBridgeTaskByOrder(t *testing.T) { require.Equal(t, benchmarkPrice, float64(0)) require.Equal(t, bid, float64(0)) require.Equal(t, ask, float64(0)) - require.Equal(t, logs.Len(), 6) - require.Contains(t, logs.All()[3].Message, "cannot parse EA telemetry price to float64, DOT id ds1_benchmark") - require.Contains(t, logs.All()[4].Message, "cannot parse EA telemetry price to float64, DOT id ds2_bid") - require.Contains(t, logs.All()[5].Message, "cannot parse EA telemetry price to float64, DOT id ds3_ask") + require.Equal(t, logs.Len(), 3) + require.Contains(t, logs.All()[0].Message, "cannot parse EA telemetry price to float64, DOT id ds1_benchmark") + require.Contains(t, logs.All()[1].Message, "cannot parse EA telemetry price to float64, DOT id ds2_bid") + require.Contains(t, logs.All()[2].Message, "cannot parse EA telemetry price to float64, DOT id ds3_ask") benchmarkPrice, bid, ask = getPricesFromBridgeTask(lggr, trrsMercuryV1[0], trrsMercuryV2, 2) require.Equal(t, 123456.123456, benchmarkPrice) @@ -1140,11 +1137,9 @@ func TestCollectMercuryEnhancedTelemetryV2(t *testing.T) { } wg.Wait() - require.Equal(t, 3, logs.Len()) + require.Equal(t, 1, logs.Len()) fmt.Println(logs.All()) - require.Contains(t, logs.All()[0].Message, "cannot parse enhanced EA telemetry bid price") - require.Contains(t, logs.All()[1].Message, "cannot parse EA telemetry") - require.Contains(t, logs.All()[2].Message, "cannot parse enhanced EA telemetry bid price") + require.Contains(t, logs.All()[0].Message, "cannot parse EA telemetry") chDone <- struct{}{} }