Skip to content

Conversation

@lycoris106
Copy link
Contributor

Description

Part of #22767

This PR together with some previous ones should resolve all the flaky tests currently found in the flow repo. Here the non-deterministic test is JreMapTest.testMapValues in flow-client.

Root Cause

The non-deterministic is from for (Entry<K, V> entry : values.entrySet()) iteration in JRE Map's forEach method. The assertion in the test assumes it preserves the insertion order.

Fix

Switched HashMap to LinkedHashMap so iteration order preserves insertion order just like JavaScript Map. We can choose to relax the assertion instead, but considering this is a fallback for JavaScript Map, we try to follow its behavior.

Note

This is the last PR for the issue #22767. If this is accepted I will close the issue.

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@mcollovati mcollovati added the Contribution PRs coming from the community or external to the team label Dec 4, 2025
@github-actions github-actions bot added the +1.0.0 label Dec 5, 2025
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Test Results

1 300 files  ± 0  1 300 suites  ±0   1h 15m 51s ⏱️ +54s
9 102 tests ± 0  9 034 ✅ ± 0  68 💤 ±0  0 ❌ ±0 
9 539 runs   - 19  9 463 ✅  - 19  76 💤 ±0  0 ❌ ±0 

Results for commit 5ff16aa. ± Comparison against base commit 1af987a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution PRs coming from the community or external to the team +1.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants