Skip to content

Commit

Permalink
GEODE-8031: Close lingering SocketCreatorFactory instances (apache#5007)
Browse files Browse the repository at this point in the history
- Ensure that any existing SocketCreatorFactory instances created by
previously-run tests are closed before each test execution in
SocketFactoryCreatorJUnitTest

Authored-by: Donal Evans <[email protected]>
  • Loading branch information
DonalEvans authored Apr 27, 2020
1 parent 9fad2c0 commit ee21019
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import java.util.Properties;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;

Expand All @@ -90,6 +91,12 @@
@Category({MembershipTest.class})
public class SocketCreatorFactoryJUnitTest {

@Before
public void setUp() {
// Ensure that no lingering SocketCreatorFactory instances are open from previous tests
SocketCreatorFactory.close();
}

@After
public void tearDown() throws Exception {
SocketCreatorFactory.close();
Expand Down

0 comments on commit ee21019

Please sign in to comment.