test(QueryResult): remove redundant QueryResultFailure - #15
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-successQueryResultinstead of letting them propagate across the JNI boundary.Connection.query()no longer throws on binder errors; the only way to observe them is viaQueryResult.isSuccess()andQueryResult.getErrorMessage().QueryResultFailurewas written for the old throwing contract and broke under the new one.QueryResultGetErrorMessagein the same file already asserts the failed-result contract on the same query (MATCH (a:personnnn) RETURN COUNT(*)) with the same expected message (Binder exception: Table personnnn does not exist.), so the duplicate can go.Verification
ladybug-javaCI on the same Java code passes (see run 31460534558)Build and Deployrun on the parent repo (31384580131) was triggered by this sameConnection.query()contract change