@Before
  @Override
  public void setUp() {
    final char[] password = new char[] {'P', 'a', 's', 's', 'w', 'o', 'r', 'd'};

    ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID);

    // System.setProperty(EncryptionManager.ENCRYPTION_FLAG, "true");
    // System.setProperty("ssl", "true");

    server = new DistributedLockServer(PORT);
    assertTrue(server.startServer(password));

    manager = new DistributedLockManager("localhost", PORT);
    manager.connectToServer(password);
  }
 static {
   ResourceLeakDetector.setLevel(Level.PARANOID);
   InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
   // need to create a test logger that searches the log output for leaks
   // and fail the test and kill the world
 }
Exemplo n.º 3
0
 @Deprecated
 public static void setEnabled(boolean enabled) {
   setLevel(enabled ? Level.SIMPLE : Level.DISABLED);
 }
 static {
   // Disable resource leak detection for performance reasons by default
   ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED);
 }