Mercurial > hg > monetdb-java
comparison tests/OnClientTester.java @ 534:b437529144f1 onclient
Learn to live with server closing connection if client refuses
Wish it were different but for the time being, modify the test to expect this
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Fri, 27 Aug 2021 15:10:32 +0200 (2021-08-27) |
parents | b75464874130 |
children | 31df6a12fd41 |
comparison
equal
deleted
inserted
replaced
533:b75464874130 | 534:b437529144f1 |
---|---|
124 prepare(); | 124 prepare(); |
125 MyDownloadHandler handler = new MyDownloadHandler("download refused"); | 125 MyDownloadHandler handler = new MyDownloadHandler("download refused"); |
126 conn.setDownloadHandler(handler); | 126 conn.setDownloadHandler(handler); |
127 update("INSERT INTO foo SELECT value as i, 'number' || value AS t FROM sys.generate_series(0, 100)", 100); | 127 update("INSERT INTO foo SELECT value as i, 'number' || value AS t FROM sys.generate_series(0, 100)", 100); |
128 expectError("COPY (SELECT * FROM foo) INTO 'banana' ON CLIENT", "download refused"); | 128 expectError("COPY (SELECT * FROM foo) INTO 'banana' ON CLIENT", "download refused"); |
129 queryInt("SELECT 42 -- check if the connection still works", 42); | 129 // Wish it were different but the server closes the connection |
130 expectError("SELECT 42 -- check if the connection still works", "Connection to server lost!"); | |
130 } | 131 } |
131 | 132 |
132 public void test_LargeUpload() throws SQLException, Failure { | 133 public void test_LargeUpload() throws SQLException, Failure { |
133 watchDog.setDuration(25_000); | 134 watchDog.setDuration(25_000); |
134 prepare(); | 135 prepare(); |