Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 3e7e9e7

Browse files
committed
Fix up slicing in comparison checks
1 parent 14190fe commit 3e7e9e7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

google-cloud-spanner/src/test/java/com/google/cloud/spanner/XGoogSpannerRequestIdTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ public void checkExpectedUnaryXGoogRequestIdsAsSuffixes(MethodAndRequestId... wa
214214
}
215215
if (wantUnaryValues.length < gotUnaryValues.length) {
216216
MethodAndRequestId[] gotSliced =
217-
Arrays.copyOfRange(gotUnaryValues, wantUnaryValues.length+1, gotUnaryValues.length);
217+
Arrays.copyOfRange(
218+
gotUnaryValues,
219+
gotUnaryValues.length - wantUnaryValues.length,
220+
gotUnaryValues.length);
218221
assertEquals(wantUnaryValues, gotSliced);
219222
} else {
220223
assertEquals(wantUnaryValues, gotUnaryValues);

0 commit comments

Comments
 (0)