Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Serveral tests are flaky because it's assumed that the code is executed in a certain time

Open
#330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
testing

Research direction

Start with thread/test/test_condition_notify_all.cpp at lines 180-203, then inspect the other tests in thread/test/ for similar fixed timing assumptions. Reproduce the failures under a slow or overloaded host and identify how completion is currently inferred. Done means the affected tests no longer fail because threads exceed the fixed 200ms wait.

Written by the indexing model from the issue text.

Description

Serveral tests in thread/test/ are flaky(sometimes pass, sometimes fail) because it assumes that the code is executed in a certain time. When the host is low or overloadded, the test will fail.
Take test_condition_notify_all.cpp as an example. The test assumes that thread1, thread2 and thread3 are finished after notify_all() and sleep 200ms are run. However, it's possible that the thread(s) are not finished after notify_all() and sleep 200ms. The test may need to consider such situation.
https://github.com/boostorg/thread/blob/409c98f8b745e72bc326e93bfaf8a353d94a69b0/test/test_condition_notify_all.cpp#L180-L203

Dominant language
C++
Stars
213
Forks
171
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/thread

All issues in boostorg/thread

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.