Mercurial > hg > monetdb-java
changeset 693:3442d331cad0
In test_ServerStopsReading, wait longer for the server to cancel the upload
Some recent server versions perform more readahead in COPY INTO.
This means that a query such as
COPY 10 RECORDS INTO foo FROM 'some-file' ON CLIENT
will upload much more data before the server finally decides it can
cancel the rest of the upload. When testing the cancellation
behavior we need to take this into account.
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Mon, 21 Nov 2022 15:59:49 +0100 (2022-11-21) |
parents | 2233b172e06d |
children | 97008566d6c5 |
files | tests/OnClientTester.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/OnClientTester.java +++ b/tests/OnClientTester.java @@ -538,7 +538,8 @@ public final class OnClientTester { private void test_ServerStopsReading() throws SQLException, Failure { initTest("test_ServerStopsReading"); prepare(); - MyUploadHandler handler = new MyUploadHandler(100); + long n = 2 * 1024 * 1024 / 10; + MyUploadHandler handler = new MyUploadHandler(n); conn.setUploadHandler(handler); update("COPY 10 RECORDS INTO foo FROM 'banana' ON CLIENT"); assertEq("cancellation callback called", true, handler.isCancelled());