Fix Flaky Integration Tests and CI Configuration Issues#1655
Merged
prachi-okta merged 8 commits intomasterfrom Nov 27, 2025
Merged
Fix Flaky Integration Tests and CI Configuration Issues#1655prachi-okta merged 8 commits intomasterfrom
prachi-okta merged 8 commits intomasterfrom
Conversation
The test was failing because the page counting logic only incremented when collectedMembers.size() was divisible by the page limit (2). With an odd number of total members (e.g., 3), this resulted in pageCount staying at 1 instead of properly reflecting multiple pages. Fixed by: - Starting pageCount at 1 (since we always fetch at least one page) - Tracking previousSize to detect when we cross page boundaries - Incrementing pageCount when we've collected more items after hitting a page boundary (previousSize % 2 == 0) This ensures the test correctly validates that pagination is working across multiple API pages even when the total items is not evenly divisible by the page limit.
- Collapsed nested if statements in MultiThreadingWarningUtil by combining conditions with && operator (lines 137-139 and 143-145) - Removed unnecessary local variable 'url' in PagedIterator.parseNextLinkFromHeaders, returning the value directly (line 129) These changes improve code readability and follow PMD best practices without changing functionality.
- GroupsIT: Add 3s wait after group creation for search indexing - UsersIT: Add 3s wait after user activation before listing - PaginationIT: Increase wait to 5s for user indexing in filter tests - IdpIT: Add comprehensive waits for IDP operations: * 3s after IDP creation * 2s after link/unlink operations * 2s before deletion - All delays use Math.max(getTestOperationDelay(), minimumMs) pattern Fixes flaky tests caused by eventual consistency in Okta API
- PaginationIT: Replace uniqueTestName with UUID for user emails to avoid conflicts - IdpIT: Add eventual consistency delays to linkedInIdpTest (same pattern as other IDP tests) This prevents 'user already exists' errors on test retries and fixes unlink timing issues
- IdpIT.facebookIdpTest: Increase link wait from 2s to 5s (Facebook IDP slower) - UsersIT.createUserWithUserTypeTest: Add 2s delay after user creation - UsersIT.filterUserTest: Increase delay to 3s for search indexing - UsersIT.userSuspendTest: Add retry logic with exponential backoff for transient server errors (E0000009) These changes improve test reliability against eventual consistency and transient API errors
- Add resource_class: xlarge to reversing-labs job (same as jdk11/jdk21) - Increase no_output_timeout to 45m for scanner step - Prevents SIGKILL (exit 9) when scanning 5,600+ files Fixes: ReversingLabs scanner consistently failing with memory exhaustion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue(s)
Description
This PR resolves multiple flaky integration test failures caused by eventual consistency issues in the Okta API and improves CI pipeline stability by fixing resource constraints in the ReversingLabs security scanner.
Category
Signoff