Commit c74fb8e
authored
Fix Flaky Integration Tests and CI Configuration Issues (#1655)
* fix: Correct page counting logic in testPagedIterableWithGroupMembers
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.
* fix: Address PMD code quality violations
- 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.
* Adding delay for a testcases, and removing parallelism from CCI
* Increase memory allocation for the ReversingLabs scan step
* fix: Add proper eventual consistency handling for integration tests
- 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
* fix: Use UUID for unique user emails and add delays to linkedInIdpTest
- 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
* fix: Add more eventual consistency delays and retry logic
- 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
* ci: Increase resources for ReversingLabs scan to prevent OOM
- 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 exhaustion1 parent 1daa922 commit c74fb8e
File tree
8 files changed
+131
-35
lines changed- .circleci
- api/src/main/java/com/okta/sdk
- client
- resource/client
- integration-tests/src/test/groovy/com/okta/sdk/tests/it
- util
8 files changed
+131
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
| 45 | + | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
140 | 139 | | |
141 | 140 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
146 | 144 | | |
147 | 145 | | |
148 | 146 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
| 129 | + | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
159 | | - | |
160 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
416 | 419 | | |
417 | 420 | | |
418 | 421 | | |
| |||
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
424 | 430 | | |
425 | 431 | | |
426 | 432 | | |
427 | 433 | | |
428 | 434 | | |
429 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
430 | 439 | | |
431 | 440 | | |
432 | 441 | | |
| |||
437 | 446 | | |
438 | 447 | | |
439 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
440 | 452 | | |
441 | 453 | | |
442 | 454 | | |
| |||
500 | 512 | | |
501 | 513 | | |
502 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
503 | 518 | | |
504 | 519 | | |
505 | 520 | | |
| |||
508 | 523 | | |
509 | 524 | | |
510 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
511 | 529 | | |
512 | 530 | | |
513 | 531 | | |
514 | 532 | | |
515 | 533 | | |
516 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
517 | 538 | | |
518 | 539 | | |
519 | 540 | | |
| |||
583 | 604 | | |
584 | 605 | | |
585 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
586 | 610 | | |
587 | 611 | | |
588 | 612 | | |
| |||
591 | 615 | | |
592 | 616 | | |
593 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
594 | 621 | | |
595 | 622 | | |
596 | 623 | | |
597 | 624 | | |
598 | 625 | | |
599 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
600 | 630 | | |
601 | 631 | | |
602 | 632 | | |
603 | 633 | | |
604 | 634 | | |
605 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
606 | 639 | | |
607 | 640 | | |
608 | 641 | | |
| |||
666 | 699 | | |
667 | 700 | | |
668 | 701 | | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
669 | 705 | | |
670 | 706 | | |
671 | 707 | | |
| |||
674 | 710 | | |
675 | 711 | | |
676 | 712 | | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
677 | 716 | | |
678 | 717 | | |
679 | 718 | | |
680 | 719 | | |
681 | 720 | | |
682 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
683 | 725 | | |
684 | 726 | | |
685 | 727 | | |
686 | 728 | | |
687 | 729 | | |
688 | 730 | | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
689 | 734 | | |
690 | 735 | | |
691 | 736 | | |
| |||
749 | 794 | | |
750 | 795 | | |
751 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
752 | 800 | | |
753 | 801 | | |
754 | 802 | | |
| |||
757 | 805 | | |
758 | 806 | | |
759 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
760 | 811 | | |
761 | 812 | | |
762 | 813 | | |
763 | 814 | | |
764 | 815 | | |
765 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
766 | 820 | | |
767 | 821 | | |
768 | 822 | | |
769 | 823 | | |
770 | 824 | | |
771 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
772 | 829 | | |
773 | 830 | | |
774 | 831 | | |
| |||
Lines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | | - | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
218 | 229 | | |
219 | 230 | | |
220 | 231 | | |
221 | | - | |
| 232 | + | |
| 233 | + | |
222 | 234 | | |
223 | 235 | | |
224 | 236 | | |
225 | 237 | | |
226 | | - | |
| 238 | + | |
| 239 | + | |
227 | 240 | | |
228 | 241 | | |
| 242 | + | |
| 243 | + | |
229 | 244 | | |
| 245 | + | |
230 | 246 | | |
231 | 247 | | |
232 | 248 | | |
| |||
315 | 331 | | |
316 | 332 | | |
317 | 333 | | |
318 | | - | |
| 334 | + | |
319 | 335 | | |
320 | 336 | | |
321 | 337 | | |
322 | 338 | | |
323 | | - | |
324 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
325 | 342 | | |
326 | 343 | | |
327 | 344 | | |
| |||
0 commit comments