diff options
author | Morten Tokle <mortent@oath.com> | 2018-03-01 12:44:15 +0100 |
---|---|---|
committer | Morten Tokle <mortent@oath.com> | 2018-03-01 12:44:15 +0100 |
commit | ee8fd61bdc378c91cb2fd0a72e2891561bf3c082 (patch) | |
tree | a6afe886b1f1bd53f6439791d277fee72a291a81 /vespa-athenz/src/test | |
parent | bacea4ade2f319217b831b5d6ce7459711826af7 (diff) |
Remove scheduler wrapper
Diffstat (limited to 'vespa-athenz/src/test')
-rw-r--r-- | vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/AthenzIdentityProviderImplTest.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/AthenzIdentityProviderImplTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/AthenzIdentityProviderImplTest.java index 29b122b09e5..3bb074cc1dc 100644 --- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/AthenzIdentityProviderImplTest.java +++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/AthenzIdentityProviderImplTest.java @@ -2,11 +2,9 @@ package com.yahoo.vespa.athenz.identityprovider; import com.yahoo.container.core.identity.IdentityConfig; -import com.yahoo.container.jdisc.athenz.AthenzIdentityProvider; import com.yahoo.container.jdisc.athenz.AthenzIdentityProviderException; import com.yahoo.jdisc.Metric; import com.yahoo.test.ManualClock; -import com.yahoo.vespa.athenz.identityprovider.AthenzIdentityProviderImpl.Scheduler; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -15,6 +13,7 @@ import java.security.cert.X509Certificate; import java.time.Duration; import java.time.Instant; import java.util.Date; +import java.util.concurrent.ScheduledExecutorService; import java.util.function.Supplier; import static org.mockito.Matchers.any; @@ -42,7 +41,7 @@ public class AthenzIdentityProviderImplTest { when(credentialService.registerInstance()) .thenThrow(new RuntimeException("athenz unavailable")); - new AthenzIdentityProviderImpl(IDENTITY_CONFIG, mock(Metric.class), credentialService, mock(Scheduler.class), new ManualClock(Instant.EPOCH)); + new AthenzIdentityProviderImpl(IDENTITY_CONFIG, mock(Metric.class), credentialService, mock(ScheduledExecutorService.class), new ManualClock(Instant.EPOCH)); } @Test @@ -70,7 +69,7 @@ public class AthenzIdentityProviderImplTest { new AthenzCredentialsService(IDENTITY_CONFIG, identityDocumentService, athenzService, clock); AthenzIdentityProviderImpl identityProvider = - new AthenzIdentityProviderImpl(IDENTITY_CONFIG, metric, credentialService, mock(Scheduler.class), clock); + new AthenzIdentityProviderImpl(IDENTITY_CONFIG, metric, credentialService, mock(ScheduledExecutorService.class), clock); identityProvider.reportMetrics(); verify(metric).set(eq(AthenzIdentityProviderImpl.CERTIFICATE_EXPIRY_METRIC_NAME), eq(certificateValidity.getSeconds()), any()); |