Skip to content

Commit 360c8b9

Browse files
committed
add assert eventually
1 parent 0a5b5a3 commit 360c8b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/integration/grpc_management_plane_api_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,8 @@ func getManagementPlaneResponses(t *testing.T, numberOfExpectedResponses int) []
507507
unmarshalErr := json.Unmarshal(responseData, &response)
508508
require.NoError(t, unmarshalErr)
509509

510-
assert.Len(t, response, numberOfExpectedResponses)
510+
assert.Eventually(t, func() bool { return len(response) == numberOfExpectedResponses },
511+
2*time.Second, 10*time.Millisecond)
511512

512513
slices.SortFunc(response, func(a, b *mpi.DataPlaneResponse) int {
513514
return a.GetMessageMeta().GetTimestamp().AsTime().Compare(b.GetMessageMeta().GetTimestamp().AsTime())

0 commit comments

Comments
 (0)