File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 1818
1919import static org .junit .Assert .assertEquals ;
2020import static org .junit .Assert .assertFalse ;
21- import static org .junit .Assert .assertNotNull ;
2221import static org .junit .Assert .assertThrows ;
2322import static org .junit .Assert .assertTrue ;
2423
@@ -754,12 +753,8 @@ public void testTransactionRunnerWithRetryOnBeginTransaction() {
754753
755754 private void verifyAtLeast1SpanHasXGoogSpannerRequestIdAttribute (List <SpanData > finishedSpans ) {
756755 AttributeKey <String > attributeKey = AttributeKey .stringKey ("x_goog_spanner_request_id" );
757- SpanData matchedSpan =
758- finishedSpans .stream ()
759- .filter (span -> !span .getAttributes ().get (attributeKey ).isEmpty ())
760- .findAny ()
761- .orElseThrow (IllegalStateException ::new );
762- assertNotNull (matchedSpan );
756+ assertTrue (
757+ finishedSpans .stream ().anyMatch (span -> !span .getAttributes ().get (attributeKey ).isEmpty ()));
763758 }
764759
765760 @ Test
You can’t perform that action at this time.
0 commit comments