-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add test for #18908 #19377
Add test for #18908 #19377
Conversation
@gankro Here's your test, sorry for the delay. |
r+? @alexcrichton |
Thanks for remembering! ❤️ |
} | ||
} | ||
const NUM_ELEMENTS: uint = 2; | ||
static in_test: AtomicBool = atomic::INIT_ATOMIC_BOOL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does in_test achieve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That the test isn't accidently run twice in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Is that an actual concern for our teating framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, maybe someone who knows it could comment on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the testing framework guarantees that a test is only run once for each test run, so it's probably ok to remove this. We've got a good number of tests elsewhere that aren't threadsafe to run in parallel either (use of static mut
globals similarly).
3cbddd2
to
807066f
Compare
No description provided.