Browse Source
The test asserts exactly 2 UserCredentialsUpdateMsg after creating a new tenant-admin user, but the user activation flow can emit either 2 or 3 depending on timing: - activateUserCredentials publishes CREDENTIALS_UPDATED (msg #1) - setUserCredentialsEnabled publishes CREDENTIALS_UPDATED (msg #2) - the initial USER ADDED edge event is processed asynchronously in UserEdgeProcessor and bundles an extra UserCredentialsUpdateMsg when it finds userCredentials.isEnabled() == true (i.e. activation already raced past the ADDED event) When the race goes the second way we end up with 1 UserUpdateMsg plus 3 UserCredentialsUpdateMsg, which currently fails the hard-coded assertEquals(2, ...) assertion. Accept both 2 and 3 UserCredentialsUpdateMsg instead of asserting an exact count, matching the reality of the asynchronous edge event pipeline.pull/15483/head
1 changed files with 6 additions and 1 deletions
Loading…
Reference in new issue