test(showcase): add integration tests showing LRO drops error details - #13984
test(showcase): add integration tests showing LRO drops error details#13984nnicolee wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds integration tests to verify that error details are currently dropped during LRO error parsing for both gRPC and HTTP/JSON clients. The reviewer recommends adding a timeout to the operationFuture.get() calls in both tests to prevent potential indefinite hangs in CI.
| ExecutionException exception = | ||
| assertThrows(ExecutionException.class, operationFuture::get); |
There was a problem hiding this comment.
Calling operationFuture.get() without a timeout can cause the test to hang indefinitely in CI if there is a regression or bug where the future never completes. It is safer to specify a timeout to ensure the test fails fast.
| ExecutionException exception = | |
| assertThrows(ExecutionException.class, operationFuture::get); | |
| ExecutionException exception = | |
| assertThrows(ExecutionException.class, () -> operationFuture.get(10, TimeUnit.SECONDS)); |
| ExecutionException exception = | ||
| assertThrows(ExecutionException.class, operationFuture::get); |
There was a problem hiding this comment.
Calling operationFuture.get() without a timeout can cause the test to hang indefinitely in CI if there is a regression or bug where the future never completes. It is safer to specify a timeout to ensure the test fails fast.
| ExecutionException exception = | |
| assertThrows(ExecutionException.class, operationFuture::get); | |
| ExecutionException exception = | |
| assertThrows(ExecutionException.class, () -> operationFuture.get(10, TimeUnit.SECONDS)); |
This PR adds two new integration test cases to the
gapic-showcaseclient targeting LRO error scenarios:testGRPC_LROErrorResponse_dropsErrorDetailstestHttpJson_LROErrorResponse_dropsErrorDetailsThese tests reproduce the defect described in #13369. They configure the showcase LRO
Waitendpoint to fail with structured error details (a gRPCStatuswith packedPoetryErrordetails) and assert that under the current code generator output, the thrownApiException.getErrorDetails()returnsnullfor both transports.These test cases serve as a baseline showcase to demonstrate the issue. Once the planned generator changes are implemented, we will update these test cases to assert that the structured error details are correctly parsed and populated inside
getErrorDetails().