From 4cd8cf3314cff3a2d7ef3c1fc31eddb740cf80f6 Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Mon, 10 Aug 2026 22:17:31 -0700 Subject: [PATCH] test(QueryResult): remove redundant QueryResultFailure PR #789 in ladybug/ladybug wraps every C API entry point with LBUG_C_API_GUARD_BEGIN/END, catching C++ exceptions at the C ABI boundary and surfacing them as a non-success QueryResult instead of letting them propagate. Connection.query() no longer throws on binder errors; the only way to observe them is via QueryResult.isSuccess() and QueryResult.getErrorMessage(). QueryResultFailure was written for the old throwing contract and broke under the new one. QueryResultGetErrorMessage in the same file already asserts the failed-result contract (same query, same expected message), so the duplicate can go. --- src/test/java/com/lbugdb/QueryResultTest.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/src/test/java/com/lbugdb/QueryResultTest.java b/src/test/java/com/lbugdb/QueryResultTest.java index f9d7a33..4471864 100644 --- a/src/test/java/com/lbugdb/QueryResultTest.java +++ b/src/test/java/com/lbugdb/QueryResultTest.java @@ -49,26 +49,6 @@ void QueryResultGetErrorMessage() { } - @Test - void QueryResultFailure() { - try (QueryResult result = conn.query("MATCH (a:personnnn) RETURN COUNT(*)")) { - assertFalse(result.isSuccess()); - List> tuples = new ArrayList>(); - while (result.hasNext()) { - FlatTuple tuple = result.getNext(); - tuples.add(copyFlatTuple(tuple, result.getNumColumns())); - fail("QueryResultFailure failed:"); - } - } - catch (Exception e) { - assertEquals("Binder exception: Table personnnn does not exist.", e.getMessage()); - return; - } - fail("QueryResultFailure failed:"); - - } - - @Test void QueryResultGetNumColumns() { try (QueryResult result = conn.query("MATCH (a:person) RETURN a.fName, a.age, a.height")) {