From 8574d6fbabe1ed115ac430fecfa6f873044a76f0 Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Mon, 1 Sep 2025 11:22:09 +0200 Subject: [PATCH] chore(integration test): prevent eventual consistency issue in TestServer_Limits_AuditLogRetention (#10608) # Which Problems Are Solved The TestServer_Limits_AuditLogRetention is too reliant on time constraints when checking that a limit is correctly applied. IN case it takes to long to do all the preparation, there won't be any events to read and the test will fail. # How the Problems Are Solved Don't require any events to be returned. # Additional Changes None # Additional Context - Noted a lot of pipeline to fail on this step. - requires backport to at least v4.x --- .../system/integration_test/limits_auditlogretention_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/grpc/system/integration_test/limits_auditlogretention_test.go b/internal/api/grpc/system/integration_test/limits_auditlogretention_test.go index b705618f6..981ba13fb 100644 --- a/internal/api/grpc/system/integration_test/limits_auditlogretention_test.go +++ b/internal/api/grpc/system/integration_test/limits_auditlogretention_test.go @@ -43,7 +43,7 @@ func TestServer_Limits_AuditLogRetention(t *testing.T) { var limitedCounts *eventCounts requireEventually(t, iamOwnerCtx, isoInstance.Client, userID, projectID, appID, projectGrantID, func(c assert.TestingT, counts *eventCounts) { counts.assertAll(c, "limited events < added events", assert.Less, addedCount) - counts.assertAll(c, "limited events > 0", assert.Greater, zeroCounts) + counts.assertAll(c, "limited events >= 0", assert.GreaterOrEqual, zeroCounts) limitedCounts = counts }, "wait for limited event assertions to pass") listedEvents, err := isoInstance.Client.Admin.ListEvents(iamOwnerCtx, &admin.ListEventsRequest{CreationDateFilter: &admin.ListEventsRequest_From{