mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 12:34:11 +01:00
Changing assumptions
- The SyncedPlan no longer runs immediately if executed on the main thread. - Update tests/names to reflect this change.
This commit is contained in:
parent
59cb5f7dbf
commit
331c33b975
@ -189,17 +189,21 @@ class PlanExecutionTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void mainThreadPlanRunsImmediately() {
|
||||
void syncedPlanDefersOnMainThread() {
|
||||
var done = new AtomicBoolean(false);
|
||||
var plan = SyncedPlan.of(() -> done.set(true));
|
||||
|
||||
plan.execute(EXECUTOR, Unit.INSTANCE);
|
||||
|
||||
Assertions.assertFalse(done.get());
|
||||
|
||||
EXECUTOR.syncPoint();
|
||||
|
||||
Assertions.assertTrue(done.get());
|
||||
}
|
||||
|
||||
@Test
|
||||
void mainThreadPlanIsNotCalledOffThread() {
|
||||
void syncedPlanDefersOffThread() {
|
||||
var done = new AtomicBoolean(false);
|
||||
|
||||
var plan = SyncedPlan.of(() -> {
|
||||
|
Loading…
Reference in New Issue
Block a user