summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-30 08:16:06 (EST)
committerEike Stepper2007-12-30 08:16:06 (EST)
commit3bdf3aa9efb5f972ce3b80e5ea6a50bfb3bbec55 (patch)
treeb94d13806209fa69a589396ecb888091cf702243
parent655de6c632064c743ac344c3e46965b0067c1e57 (diff)
downloadcdo-3bdf3aa9efb5f972ce3b80e5ea6a50bfb3bbec55.zip
cdo-3bdf3aa9efb5f972ce3b80e5ea6a50bfb3bbec55.tar.gz
cdo-3bdf3aa9efb5f972ce3b80e5ea6a50bfb3bbec55.tar.bz2
[213748] Connection delays with Windows Vista
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213748
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java
index 3c1f4ad..81a2688 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java
@@ -10,26 +10,25 @@
**************************************************************************/
package org.eclipse.net4j.tests;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
import java.nio.channels.Selector;
+import java.nio.channels.spi.SelectorProvider;
+
+import junit.framework.TestCase;
/**
* @author Eike Stepper
*/
-public class SelectorTest extends AbstractOMTest
+public class SelectorTest extends TestCase
{
- public void testInteger() throws Exception
+ public void testOpen() throws Exception
{
- for (int i = 0; i < 5; i++)
+ SelectorProvider provider = SelectorProvider.provider();
+ System.out.println(provider.getClass().getName());
+ for (int i = 0; i < 10; i++)
{
long start = System.currentTimeMillis();
- Selector selector = Selector.open();
+ Selector selector = provider.openSelector();
long duration = System.currentTimeMillis() - start;
- if (i == 0)
- {
- System.out.println(selector.provider().getClass().getName());
- }
System.out.println(duration);
selector.close();