Commit 2e53a66
authored
Fix test assertions that depend on undefined row ordering (#3007)
* Fix test assertions that depend on undefined row ordering
Several tests use containsExactly() or index-based comparison on query
results that have no ORDER BY clause. SQL does not guarantee row ordering
without explicit ORDER BY, and databases like YugabyteDB return results
in a different (but valid) order than PostgreSQL/H2.
These tests verify set membership (correct targets assigned, correct
actions stored), not ordering. Changed to order-independent assertions:
- AutoAssignTest: containsExactly -> containsExactlyInAnyOrder
- ControllerManagementTest: index-based loop -> containsExactlyInAnyOrderElementsOf
- TargetFilterQueryManagementTest: containsExactly -> containsExactlyInAnyOrder
Verified passing on H2 (default) and YugabyteDB (PostgreSQL-compatible).
* Trigger ECA re-check1 parent bdb87a9 commit 2e53a66
3 files changed
Lines changed: 6 additions & 7 deletions
File tree
- hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa
- acm
- management
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1448 | 1447 | | |
1449 | 1448 | | |
1450 | 1449 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| |||
0 commit comments