Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flaky failure solved #1297

Closed
wants to merge 1 commit into from
Closed

flaky failure solved #1297

wants to merge 1 commit into from

Conversation

Alisha-0321
Copy link

The flaky test failure is resolved with my fixes. I run the test 10,000 times, and every time the test passes.

Description

try {
Thread.sleep(100);
} catch (InterruptedException e) {
System.out.println("Exception");
}

Related Issue

#1296

Motivation and Context

This removes the test failures.

How Has This Been Tested?

With my solution, I run the test 10,000 times with the following command, and the test has never failed.
mvn test -Dtest=org.java_websocket.issues.Issue580Test#runNoCloseBlockingTestScenario[7]

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@marci4
Copy link
Collaborator

marci4 commented Jul 20, 2023

We cannot simple sleep in the main code

@marci4 marci4 closed this Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants