Skip to content

Commit 05ca898

Browse files
committed
Fix testDirectTrinoClientLongQuery
Example timings of processing pages in DirectTrinoClient during a local run: ``` 0.007584s 9.58E-4s 0.001542s 0.001792s 0.002708s 0.406709s ``` In this test, after processing each page, `DirectTrinoClient` waits 0.5s and sends a heartbeat. The `query.client.timeout` is set to 1s. Considering that processing the last page took 0.4s, it’s easy to imagine that sometimes the total interval between sending heartbeats exceeds 1s. This test doesn’t care about the query output, so using `EXPLAIN ANALYZE` and ignoring the results is fine. Now the example timings look as follows: ``` 0.006958s 0.00125s 0.001292s 0.001875s 0.001333s 0.039125s ``` As an experiment, I reverted the bugfix that this test is validating, and the test failed with EXPLAIN ANALYZE, so the intended behavior is still covered.
1 parent b0738cb commit 05ca898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/trino-tests/src/test/java/io/trino/client/direct/TestDirectTrinoClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ public void setup()
5959
@Timeout(value = 20, unit = TimeUnit.SECONDS)
6060
public void testDirectTrinoClientLongQuery()
6161
{
62-
queryRunner.execute(TEST_SESSION, "SELECT * FROM blackhole.test_schema.slow_test_table");
62+
queryRunner.execute(TEST_SESSION, "EXPLAIN ANALYZE SELECT * FROM blackhole.test_schema.slow_test_table");
6363
}
6464
}

0 commit comments

Comments
 (0)