aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-24 20:30:31 +0200
committerSven Gothel <[email protected]>2013-10-24 20:30:31 +0200
commitbb7c2da1ed6791bf50a32a880a939cdaecf82701 (patch)
treef4afa51ac6f483eaf2d88d7ffc192002ee87c582 /src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
parentaa7a0d3a3feee1360ae4d7465a9da263aea530ac (diff)
Use org.junit.Assert instead of deprecated junit.framework.Assert
Diffstat (limited to 'src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java')
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
index 32a1c00..cb862ce 100644
--- a/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
+++ b/src/junit/com/jogamp/common/util/locks/TestSingletonServerSocket02.java
@@ -3,14 +3,14 @@
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,7 +20,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
@@ -29,8 +29,7 @@ package com.jogamp.common.util.locks;
import java.io.IOException;
-import junit.framework.Assert;
-
+import org.junit.Assert;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -45,10 +44,10 @@ public class TestSingletonServerSocket02 {
public static final long SINGLE_INSTANCE_LOCK_TO = 3*60*1000; // wait up to 3 min
public static final long SINGLE_INSTANCE_LOCK_POLL = 1000; // poll every 1s
private static volatile SingletonInstance singletonInstance;
-
+
@BeforeClass
public static void oneTimeSetUp() {
- // one-time initialization code
+ // one-time initialization code
singletonInstance = SingletonInstance.createServerSocket(SINGLE_INSTANCE_LOCK_POLL, SINGLE_INSTANCE_LOCK_PORT);
Assert.assertTrue("Could not lock single instance: "+singletonInstance.getName(), singletonInstance.tryLock(SINGLE_INSTANCE_LOCK_TO));
}
@@ -56,14 +55,14 @@ public class TestSingletonServerSocket02 {
@AfterClass
public static void oneTimeTearDown() {
System.gc(); // force cleanup
- singletonInstance.unlock();
+ singletonInstance.unlock();
}
-
+
@Test
public void dummy() throws InterruptedException {
// make junit happy
}
-
+
// @Test(timeout=10) // Only enable manually to test timeout behavior
public void testTimeout() throws InterruptedException {
Thread.sleep(3000);