mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 11:45:49 +01:00
Inject SchedulerImpl into DelegatedSchedulerImpl to fix waiting bundles (#1054)
Fixes #1053 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
b48f1c1925
commit
c9232d9651
@ -42,10 +42,10 @@ public class DelegatedSchedulerImpl implements Scheduler {
|
||||
|
||||
private final Set<ScheduledCompletableFuture<?>> scheduledJobs = new HashSet<>();
|
||||
|
||||
private @NonNullByDefault({}) Scheduler delegate;
|
||||
private @NonNullByDefault({}) SchedulerImpl delegate;
|
||||
|
||||
@Activate
|
||||
public DelegatedSchedulerImpl(final @Reference Scheduler scheduler) {
|
||||
public DelegatedSchedulerImpl(final @Reference SchedulerImpl scheduler) {
|
||||
this.delegate = scheduler;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import org.eclipse.smarthome.core.scheduler.ScheduledCompletableFuture;
|
||||
import org.eclipse.smarthome.core.scheduler.Scheduler;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
@ -40,7 +39,7 @@ public class DelegatedSchedulerTest {
|
||||
private DelegatedSchedulerImpl delegatedscheduler;
|
||||
|
||||
@Mock
|
||||
private Scheduler scheduler;
|
||||
private SchedulerImpl scheduler;
|
||||
@Mock
|
||||
private ScheduledCompletableFuture<Instant> temporalScheduledFuture;
|
||||
@Mock
|
||||
|
Loading…
Reference in New Issue
Block a user