adoroszlai commented on code in PR #4749:
URL: https://github.com/apache/ozone/pull/4749#discussion_r1199351125
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHASnapshot.java:
##########
@@ -42,23 +52,51 @@
* Tests snapshot in OM HA setup.
*/
@Timeout(300)
-@Disabled("HDDS-8645")
-public class TestOzoneManagerHASnapshot extends TestOzoneManagerHA {
+public class TestOzoneManagerHASnapshot {
+ private static MiniOzoneHAClusterImpl cluster;
+ private static OzoneClient client;
+ private static String volumeName;
+ private static String bucketName;
+ private static ObjectStore store;
+ private static OzoneBucket ozoneBucket;
+
+ @BeforeAll
+ public static void staticInit() throws Exception {
+ OzoneConfiguration conf = new OzoneConfiguration();
+ String clusterId = UUID.randomUUID().toString();
+ String scmId = UUID.randomUUID().toString();
+ conf.setBoolean(OMConfigKeys.OZONE_FILESYSTEM_SNAPSHOT_ENABLED_KEY, true);
+
+ cluster = (MiniOzoneHAClusterImpl) MiniOzoneCluster.newOMHABuilder(conf)
+ .setClusterId(clusterId)
+ .setScmId(scmId)
+ .setOMServiceId("om-service-test")
+ .setNumOfOzoneManagers(3)
+ .build();
+
+ cluster.waitForClusterToBeReady();
+ client = cluster.newClient();
+ store = client.getObjectStore();
+ ozoneBucket = TestDataUtil.createVolumeAndBucket(client);
+ volumeName = ozoneBucket.getVolumeName();
+ bucketName = ozoneBucket.getName();
+ }
+
+ @AfterAll
+ public static void cleanUp() {
+ if (cluster != null) {
+ cluster.shutdown();
+ }
+ }
Review Comment:
Please add
```suggestion
@AfterAll
public static void cleanUp() {
IOUtils.closeQuietly(client);
if (cluster != null) {
cluster.shutdown();
}
}
```
and the necessary import:
```
import org.apache.hadoop.hdds.utils.IOUtils;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]