Skip to content

Commit f2fb39f

Browse files
committed
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.
1 parent 9adfa99 commit f2fb39f

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

‎src/test/java/com/lbugdb/QueryResultTest.java‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,6 @@ void QueryResultGetErrorMessage() {
4949
}
5050

5151

52-
@Test
53-
void QueryResultFailure() {
54-
try (QueryResult result = conn.query("MATCH (a:personnnn) RETURN COUNT(*)")) {
55-
assertFalse(result.isSuccess());
56-
List<List<Value>> tuples = new ArrayList<List<Value>>();
57-
while (result.hasNext()) {
58-
FlatTuple tuple = result.getNext();
59-
tuples.add(copyFlatTuple(tuple, result.getNumColumns()));
60-
fail("QueryResultFailure failed:");
61-
}
62-
}
63-
catch (Exception e) {
64-
assertEquals("Binder exception: Table personnnn does not exist.", e.getMessage());
65-
return;
66-
}
67-
fail("QueryResultFailure failed:");
68-
69-
}
70-
71-
7252
@Test
7353
void QueryResultGetNumColumns() {
7454
try (QueryResult result = conn.query("MATCH (a:person) RETURN a.fName, a.age, a.height")) {

0 commit comments

Comments
 (0)