Polish ReactorResourceFactoryTests
This commit is contained in:
@@ -33,6 +33,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
|
|||||||
/**
|
/**
|
||||||
* Unit tests for {@link ReactorResourceFactory}.
|
* Unit tests for {@link ReactorResourceFactory}.
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
public class ReactorResourceFactoryTests {
|
public class ReactorResourceFactoryTests {
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ public class ReactorResourceFactoryTests {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void globalResources() throws Exception {
|
void globalResources() {
|
||||||
|
|
||||||
this.resourceFactory.setUseGlobalResources(true);
|
this.resourceFactory.setUseGlobalResources(true);
|
||||||
this.resourceFactory.afterPropertiesSet();
|
this.resourceFactory.afterPropertiesSet();
|
||||||
@@ -60,7 +61,7 @@ public class ReactorResourceFactoryTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void globalResourcesWithConsumer() throws Exception {
|
void globalResourcesWithConsumer() {
|
||||||
|
|
||||||
AtomicBoolean invoked = new AtomicBoolean();
|
AtomicBoolean invoked = new AtomicBoolean();
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ public class ReactorResourceFactoryTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void localResources() throws Exception {
|
void localResources() {
|
||||||
|
|
||||||
this.resourceFactory.setUseGlobalResources(false);
|
this.resourceFactory.setUseGlobalResources(false);
|
||||||
this.resourceFactory.afterPropertiesSet();
|
this.resourceFactory.afterPropertiesSet();
|
||||||
@@ -94,7 +95,7 @@ public class ReactorResourceFactoryTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void localResourcesViaSupplier() throws Exception {
|
void localResourcesViaSupplier() {
|
||||||
|
|
||||||
this.resourceFactory.setUseGlobalResources(false);
|
this.resourceFactory.setUseGlobalResources(false);
|
||||||
this.resourceFactory.setConnectionProviderSupplier(() -> this.connectionProvider);
|
this.resourceFactory.setConnectionProviderSupplier(() -> this.connectionProvider);
|
||||||
@@ -118,7 +119,7 @@ public class ReactorResourceFactoryTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void customShutdownDurations() throws Exception {
|
void customShutdownDurations() {
|
||||||
Duration quietPeriod = Duration.ofMillis(500);
|
Duration quietPeriod = Duration.ofMillis(500);
|
||||||
Duration shutdownTimeout = Duration.ofSeconds(1);
|
Duration shutdownTimeout = Duration.ofSeconds(1);
|
||||||
this.resourceFactory.setUseGlobalResources(false);
|
this.resourceFactory.setUseGlobalResources(false);
|
||||||
@@ -135,7 +136,7 @@ public class ReactorResourceFactoryTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void externalResources() throws Exception {
|
void externalResources() {
|
||||||
|
|
||||||
this.resourceFactory.setUseGlobalResources(false);
|
this.resourceFactory.setUseGlobalResources(false);
|
||||||
this.resourceFactory.setConnectionProvider(this.connectionProvider);
|
this.resourceFactory.setConnectionProvider(this.connectionProvider);
|
||||||
|
|||||||
Reference in New Issue
Block a user