mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 01:06:50 +00:00
Resolve ExtensionContext.Store.CloseableResource deprecation warnings
This commit is contained in:
1 parent
2df897ab0b
commit
4289d454f3
3 files changed
+6
-6
No files matched your search
+2
-2
@@ -35,7 +35,7 @@ import org.whispersystems.textsecuregcm.configuration.CircuitBreakerConfiguratio
|
||||
import org.whispersystems.textsecuregcm.util.ResilienceUtil;
|
||||
import org.whispersystems.textsecuregcm.util.TestcontainersImages;
|
||||
|
||||
public class RedisClusterExtension implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback, ExtensionContext.Store.CloseableResource {
|
||||
public class RedisClusterExtension implements AutoCloseable, BeforeAllCallback, BeforeEachCallback, AfterEachCallback {
|
||||
|
||||
private static ComposeContainer composeContainer;
|
||||
private static Map<HostAndPort, HostAndPort> exposedAddressesByInternalAddress;
|
||||
@@ -93,7 +93,7 @@ public class RedisClusterExtension implements BeforeAllCallback, BeforeEachCallb
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws Throwable {
|
||||
public void close() {
|
||||
if (composeContainer != null) {
|
||||
composeContainer.stop();
|
||||
composeContainer = null;
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ import software.amazon.awssdk.services.dynamodb.model.LocalSecondaryIndex;
|
||||
import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughput;
|
||||
import software.amazon.awssdk.services.dynamodb.model.ResourceNotFoundException;
|
||||
|
||||
public class DynamoDbExtension implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback, ExtensionContext.Store.CloseableResource {
|
||||
public class DynamoDbExtension implements AutoCloseable, BeforeAllCallback, BeforeEachCallback, AfterEachCallback {
|
||||
|
||||
public interface TableSchema {
|
||||
String tableName();
|
||||
@@ -133,7 +133,7 @@ public class DynamoDbExtension implements BeforeAllCallback, BeforeEachCallback,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws Throwable {
|
||||
public void close() {
|
||||
stopServer();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ import org.junit.jupiter.api.extension.BeforeEachCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.whispersystems.textsecuregcm.storage.foundationdb.FaultTolerantDatabase;
|
||||
|
||||
public class FoundationDbClusterExtension implements BeforeAllCallback, BeforeEachCallback, ExtensionContext.Store.CloseableResource {
|
||||
public class FoundationDbClusterExtension implements AutoCloseable, BeforeAllCallback, BeforeEachCallback {
|
||||
|
||||
private final FoundationDbDatabaseLifecycleManager[] databaseLifecycleManagers;
|
||||
private final FaultTolerantDatabase[] databases;
|
||||
@@ -57,7 +57,7 @@ public class FoundationDbClusterExtension implements BeforeAllCallback, BeforeEa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws Throwable {
|
||||
public void close() {
|
||||
if (databaseLifecycleManagers[0] != null) {
|
||||
for (final FoundationDbDatabaseLifecycleManager databaseLifecycleManager : databaseLifecycleManagers) {
|
||||
databaseLifecycleManager.closeDatabase();
|
||||
|
||||
Reference in new issue
Block a user