Skip to content

Commit 3e7e9e7

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)