https://github.com/brianm/clocked-executor
Easy testing of ScheduledExecutorService thinglets
https://github.com/brianm/clocked-executor
Last synced: 5 months ago
JSON representation
Easy testing of ScheduledExecutorService thinglets
- Host: GitHub
- URL: https://github.com/brianm/clocked-executor
- Owner: brianm
- License: apache-2.0
- Created: 2014-04-10T23:57:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-03-29T17:38:08.000Z (over 9 years ago)
- Last Synced: 2025-07-05T19:19:00.092Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Test-Oriented Scheduled Executor
[](https://search.maven.org/#search%7Cga%7C1%7Ca%3Aclocked-executor%20g%3Aorg.skife)
ScheduledExecutorService implementation designed for deterministic testing. It runs off an
internal clock which must be manually advanced via the ClockedExecutorService#advance
method.
Additionally, for recurring scheduled tasks, there is a guarantee that the task will only
be called once for each call to advance(...). This is important to note as it
rather violates the normal contracts, but is very useful for testing.
See this [example](src/test/java/org/skife/clocked/ClockedExecutorServiceTest.java).