Mercurial > hg > monetdb-java
diff tests/JDBC_API_Tester.java @ 700:940e266eeccd
Refactor BufferedMCLReader
It used to inherit from BufferedReader but there is no reason for that.
Also, it used to have a method readLine() which
- returned the line read
- stored the linetype
In the new setup we have a method advance() which reads
a line and stores both it and its type.
This makes the code more regular and makes it possible to
peek ahead without consuming.
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Thu, 08 Dec 2022 15:59:17 +0100 (2022-12-08) |
parents | 0ff364f569a1 |
children | 5244af37a8e2 |
line wrap: on
line diff
--- a/tests/JDBC_API_Tester.java +++ b/tests/JDBC_API_Tester.java @@ -6172,7 +6172,7 @@ final public class JDBC_API_Tester { org.monetdb.mcl.io.BufferedMCLReader mclIn = server.getReader(); org.monetdb.mcl.io.BufferedMCLWriter mclOut = server.getWriter(); - String error = mclIn.waitForPrompt(); + String error = mclIn.discardRemainder(); if (error != null) sb.append("Received start error: ").append(error).append("\n"); @@ -6190,13 +6190,13 @@ final public class JDBC_API_Tester { } mclOut.writeLine(""); // need this one for synchronisation over flush() - error = mclIn.waitForPrompt(); + error = mclIn.discardRemainder(); if (error != null) sb.append("Received error: ").append(error).append("\n"); mclOut.writeLine(""); // need this one for synchronisation over flush() - error = mclIn.waitForPrompt(); + error = mclIn.discardRemainder(); if (error != null) sb.append("Received finish error: ").append(error).append("\n");