Skip to content

Commit

Permalink
HDDS-9783. Unregister MBean after test execution in TestAbstractLayou…
Browse files Browse the repository at this point in the history
…tVersionManager. (apache#5687)
  • Loading branch information
nandakumar131 authored Nov 28, 2023
1 parent 3aca295 commit d838993
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.lang.management.ManagementFactory;
import java.util.Iterator;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
Expand All @@ -50,6 +51,11 @@ public void setup() {
MockitoAnnotations.initMocks(this);
}

@AfterEach
public void close() {
versionManager.close();
}

@Test
public void testInitializationWithFeaturesToBeFinalized() throws Exception {
versionManager.init(1, getTestLayoutFeatures(3));
Expand Down

0 comments on commit d838993

Please sign in to comment.