Skip to content

Commit c9fda9f

Browse files
author
Achim Brandt
committed
added timeout test
1 parent 56b6f99 commit c9fda9f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/java/com/arangodb/ArangoConfigureTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import java.net.SocketTimeoutException;
2727

28-
import org.junit.Ignore;
28+
import org.apache.http.conn.ConnectTimeoutException;
2929
import org.junit.Test;
3030

3131
/**
@@ -60,29 +60,29 @@ public void load_from_proerty_file2() {
6060

6161
}
6262

63-
@Ignore
63+
6464
@Test
6565
public void connect_timeout() throws ArangoException {
6666

6767
ArangoConfigure configure = new ArangoConfigure();
68+
configure.setHost("127.0.0.200");
6869
configure.setConnectionTimeout(1); // 1ms
6970
configure.init();
7071

7172
ArangoDriver driver = new ArangoDriver(configure);
72-
/*
73+
7374
try {
74-
driver.getVersion();
75+
driver.getCollections();
7576
fail("did no timeout");
7677
} catch (ArangoException e) {
7778
assertThat(e.getCause(), instanceOf(ConnectTimeoutException.class));
7879
}
79-
*/
80+
8081
configure.shutdown();
8182

8283
}
8384

8485
@Test
85-
@Ignore
8686
public void so_connect_timeout() throws ArangoException {
8787

8888
ArangoConfigure configure = new ArangoConfigure();

0 commit comments

Comments
 (0)