Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
2k views

JUnit assertion for concurrency test

I'm learning Java concurrency by a TDD approach. Therefore I wrote a basic test case in JUnit to test the behaviour / expected results of 2 threads. I'm looking for feedback for this code. In ...
Mincong Huang's user avatar
4 votes
2 answers
17k views

Testing an Executor

I have written the following Executor: ...
yankee's user avatar
  • 508
4 votes
1 answer
7k views

Unit test an ExecutorService in a deamon

To execute tasks sequentially with a timeout I use ExecutorService.submit() and Future.get(). As I don't want to block calling ...
Philippe Blayo's user avatar