Skip to content

Commit 7ce6aad

Browse files
cpovirksduskis
authored andcommitted
---
yaml --- r: 33701 b: refs/heads/autosynth-redis c: 14d2eec h: refs/heads/master i: 33699: 84bcf1d
1 parent 28b9430 commit 7ce6aad

6 files changed

Lines changed: 17 additions & 12 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ refs/heads/autosynth-iot: 044be280805a59e06d09658688c9ee474a9815ad
135135
refs/heads/autosynth-kms: d31449d6621a50fb16a4bef4f30f0f3051d27d7c
136136
refs/heads/autosynth-language: 6130869312f99a1e7d3aa0485759172a23333cc5
137137
refs/heads/autosynth-os-login: 49028d40ac477fca5f948cc5a3ce7422729fdb67
138-
refs/heads/autosynth-redis: b36a621a0729522caeff7b6647d26981791d9fd9
138+
refs/heads/autosynth-redis: 14d2eec96e61a15f6a6ac9a6ab5a2efa8b31253d
139139
refs/heads/autosynth-scheduler: 57f9fdb1e7de30c85f4ec7198931a07f50603e55
140140
refs/heads/autosynth-spanner: de02ca32edea133b68b51052e325359a3704b5d2
141141
refs/heads/autosynth-speech: 64692f6db11364f663921be02c08072b966b6e7b

branches/autosynth-redis/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractStructReaderTypesTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static com.google.cloud.spanner.Type.StructField;
2020
import static com.google.common.truth.Truth.assertThat;
21+
import static com.google.common.truth.Truth.assertWithMessage;
2122
import static org.junit.Assert.fail;
2223
import static org.junit.runners.Parameterized.Parameter;
2324

@@ -352,17 +353,17 @@ public void getterForIncorrectType() throws Exception {
352353
getterByIndex(method.getName(), columnIndex);
353354
fail("Expected ISE for " + method);
354355
} catch (IllegalStateException e) {
355-
assertThat(e.getMessage()).named("Exception for " + method).contains("was " + type);
356-
assertThat(e.getMessage())
357-
.named("Exception for " + method)
356+
assertWithMessage("Exception for " + method).that(e.getMessage()).contains("was " + type);
357+
assertWithMessage("Exception for " + method)
358+
.that(e.getMessage())
358359
.contains("Column " + columnIndex);
359360
}
360361
try {
361362
getterByName(method.getName(), "F1");
362363
fail("Expected ISE for " + method);
363364
} catch (IllegalStateException e) {
364-
assertThat(e.getMessage()).named("Exception for " + method).contains("was " + type);
365-
assertThat(e.getMessage()).named("Exception for " + method).contains("Column F1");
365+
assertWithMessage("Exception for " + method).that(e.getMessage()).contains("was " + type);
366+
assertWithMessage("Exception for " + method).that(e.getMessage()).contains("Column F1");
366367
}
367368
}
368369
}

branches/autosynth-redis/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TimestampBoundTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static com.google.common.testing.SerializableTester.reserializeAndAssert;
2020
import static com.google.common.truth.Truth.assertThat;
21+
import static com.google.common.truth.Truth.assertWithMessage;
2122

2223
import com.google.cloud.Timestamp;
2324
import com.google.cloud.spanner.TimestampBound.Mode;
@@ -110,8 +111,8 @@ public void stalenessSourceUnits() {
110111
long num = 7;
111112
for (TimeUnit units : TimeUnit.values()) {
112113
TimestampBound bound = TimestampBound.ofExactStaleness(num, units);
113-
assertThat(bound.getExactStaleness(TimeUnit.NANOSECONDS))
114-
.named(units.toString())
114+
assertWithMessage(units.toString())
115+
.that(bound.getExactStaleness(TimeUnit.NANOSECONDS))
115116
.isEqualTo(units.toNanos(num));
116117
}
117118
}

branches/autosynth-redis/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ValueBinderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.spanner;
1818

1919
import static com.google.common.truth.Truth.assertThat;
20+
import static com.google.common.truth.Truth.assertWithMessage;
2021

2122
import com.google.cloud.ByteArray;
2223
import com.google.cloud.Date;
@@ -54,7 +55,7 @@ public void reflection() throws InvocationTargetException, IllegalAccessExceptio
5455
continue;
5556
}
5657
Method binderMethod = findBinderMethod(method);
57-
assertThat(binderMethod).named("Binder for " + method.toString()).isNotNull();
58+
assertWithMessage("Binder for " + method.toString()).that(binderMethod).isNotNull();
5859

5960
if (method.getName().toLowerCase().contains("struct")) {
6061
// Struct / Array-of-struct binding methods.

branches/autosynth-redis/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ValueTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static com.google.common.testing.SerializableTester.reserializeAndAssert;
2020
import static com.google.common.truth.Truth.assertThat;
21+
import static com.google.common.truth.Truth.assertWithMessage;
2122

2223
import com.google.cloud.ByteArray;
2324
import com.google.cloud.Date;
@@ -359,8 +360,8 @@ public void boolArrayFromPlainIterable() {
359360
}
360361
String name = "boolArray() of length " + i;
361362
Value v = Value.boolArray(plainIterable(data));
362-
assertThat(v.isNull()).named(name).isFalse();
363-
assertThat(v.getBoolArray()).named(name).containsExactly((Object[]) data).inOrder();
363+
assertWithMessage(name).that(v.isNull()).isFalse();
364+
assertWithMessage(name).that(v.getBoolArray()).containsExactly((Object[]) data).inOrder();
364365
}
365366
}
366367

branches/autosynth-redis/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITReadTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import static com.google.cloud.spanner.SpannerMatchers.isSpannerException;
2020
import static com.google.cloud.spanner.Type.StructField;
2121
import static com.google.common.truth.Truth.assertThat;
22+
import static com.google.common.truth.Truth.assertWithMessage;
2223

2324
import com.google.cloud.spanner.Database;
2425
import com.google.cloud.spanner.DatabaseClient;
@@ -426,7 +427,7 @@ private void checkReadRange(Source source, KeySet keySet, long limit, int[] expe
426427
rows.put(resultSet.getString(0), resultSet.getString(1));
427428
}
428429

429-
assertThat(rows).named("read of " + keySet).isEqualTo(expected);
430+
assertWithMessage("read of " + keySet).that(rows).isEqualTo(expected);
430431
}
431432

432433
private void checkRange(Source source, KeyRange range, int... expectedRows) {

0 commit comments

Comments
 (0)