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

Fix the flaky test in ThrottlingExecutorSuite #12094

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

jihoonson
Copy link
Collaborator

The test task metrics test is flaky. This test verifies the max throttle time metric in the ThrottlingExecutor while there are two tasks in the executor, one running and another waiting. The way it measures the expected max of the max throttle time is not quite right. Here is a brief summary of what this test does:

  • The main thread submits a task. This task runs until it is told to stop.
  • Another thread submits a task. This task waits until the running task finishes.
  • The main thread sleeps for a certain time.
  • The main thread stops the running task. This will let the waiting task run.
  • The main thread verifies the max throttle time by comparing it to the sleep time.

The last verification can flake because the sleep time may not reflect the actual wait time in the ThrottlingExecutor. Submitting a task can take some time which will reduce the actual wait time in the executor. This PR fixes this test by using the actual wait time to validate the metric.

@jihoonson jihoonson force-pushed the fix-flaky-metric-task branch from 3b73412 to 6cf0e7c Compare February 10, 2025 19:34
@jihoonson
Copy link
Collaborator Author

build

@jihoonson jihoonson merged commit fb13fb8 into NVIDIA:branch-25.04 Feb 11, 2025
51 checks passed
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.

2 participants