Skip to content

Commit 73cd4b2

Browse files
committed
added time assertion to detect init time increase
1 parent 20acfc3 commit 73cd4b2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client-v2/src/test/java/com/clickhouse/client/ClientTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,10 @@ public void testSetOptions() {
130130

131131
@Test
132132
public void testLoadingServerContext() throws Exception {
133-
134133
long start = System.nanoTime();
135134
try (Client client = newClient().build()) {
136-
long initTime = System.nanoTime() - start;
137-
System.out.println("init time " + (initTime / 1_000_000));
135+
long initTime = (System.nanoTime() - start) / 1_000_000;
136+
Assert.assertTrue(initTime < 100);
138137
Assert.assertNull(client.getServerVersion());
139138
client.loadServerInfo();
140139
Assert.assertNotNull(client.getServerVersion());

0 commit comments

Comments
 (0)