Fix test helper

This commit is contained in:
Rene Pfeuffer
2019-12-11 12:58:01 +01:00
parent 9a8f0a4ee7
commit a37df2c20b
3 changed files with 18 additions and 7 deletions

View File

@@ -20,10 +20,6 @@ public class DefaultSyncAsyncExecutor implements SyncAsyncExecutor {
this.switchToAsyncTime = switchToAsyncTime;
}
public ExecutionType execute(Runnable runnable) {
return execute(ignored -> runnable.run());
}
public ExecutionType execute(Consumer<ExecutionType> runnable) {
if (Instant.now().isAfter(switchToAsyncTime)) {
executor.execute(() -> runnable.accept(ASYNCHRONOUS));