mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-02 08:09:44 +00:00
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
(cherry picked from commit 8574d6fbab)
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user