Skip to content

chore: avoid flakiness of DefaultSupervisingTest#16002

Merged
davsclaus merged 1 commit intoapache:mainfrom
apupier:AvoidFlakinessOfDefaultSupervisingTest
Oct 18, 2024
Merged

chore: avoid flakiness of DefaultSupervisingTest#16002
davsclaus merged 1 commit intoapache:mainfrom
apupier:AvoidFlakinessOfDefaultSupervisingTest

Conversation

@apupier
Copy link
Contributor

@apupier apupier commented Oct 18, 2024

the 2 exhausted failure collected were not always the last two. So adapting the assertion to check in the full list the right number of exhausted failure instead of the last 2 elements.

Based on what I understand from the codebase, the order is not important (but if it the case, we need to fix something in runtime code and not the test)

Description

Note that this test was failing very often on different architecture (so usually marked with a last failure of 1)
For instance:
https://ci-builds.apache.org/job/Camel/job/Camel%20Core%20(Build%20and%20test)/job/main/475/testReport/junit/org.apache.camel.impl.engine/DefaultSupervisingRouteControllerTest/BuildAndTest___Matrix___JDK_NAME____jdk_21_latest___PLATFORM____ubuntu_avx____Test___testSupervising_2/
https://ci-builds.apache.org/job/Camel/job/Camel%20Core%20(Build%20and%20test)/job/main/471/testReport/junit/org.apache.camel.impl.engine/DefaultSupervisingRouteControllerTest/BuildAndTest___Matrix___JDK_NAME____jdk_17_latest___PLATFORM____s390x____Test___testSupervising/

Note that the improved assertion message revela the issue:

The 9th failure event must be exhausted. Current state of failure list: 
Attempt: 0, Is exhausted: falseCannot start, timestamp: 0
Attempt: 0, Is exhausted: falseCannot start, timestamp: 0
Attempt: 1, Is exhausted: falseCannot start, timestamp: 0
Attempt: 1, Is exhausted: falseCannot start, timestamp: 0
Attempt: 2, Is exhausted: falseCannot start, timestamp: 0
Attempt: 2, Is exhausted: falseCannot start, timestamp: 0
Attempt: 3, Is exhausted: falseCannot start, timestamp: 0
Attempt: 3, Is exhausted: trueCannot start, timestamp: 0
Attempt: 3, Is exhausted: falseCannot start, timestamp: 0
Attempt: 3, Is exhausted: trueCannot start, timestamp: 0 ==> expected: <true> but was: <false>

Target

  • I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

the 2 exhausted failure collected were not always the last two. So
adapting the assertion to check in the full list the right number of
exhausted failure instead of the last 2 elements

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run

  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot.

  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.

  • Build and test logs are available in the Summary page. Only Apache Camel committers have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus davsclaus merged commit 7934990 into apache:main Oct 18, 2024
@apupier apupier deleted the AvoidFlakinessOfDefaultSupervisingTest branch November 20, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants