Skip to content

Commit defa327

Browse files
cpovirksduskis
authored andcommitted
---
yaml --- r: 32539 b: refs/heads/autosynth-firestore c: 14d2eec h: refs/heads/master i: 32537: 29f56d6 32535: 82dcb70
1 parent b85b4c3 commit defa327

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
@@ -130,7 +130,7 @@ refs/heads/autosynth-containeranalysis: 18d210f81f17cf74864d0db2c29e834302f74f2a
130130
refs/heads/autosynth-datastore: f1efc3dc465174f41041acd56cf29badcec3e5bd
131131
refs/heads/autosynth-dialogflow: 73974cc32e5212aec0126472e0bc1442886fedaf
132132
refs/heads/autosynth-errorreporting: effe8001d110ad584187b30aafc473db0dd4a15f
133-
refs/heads/autosynth-firestore: b36a621a0729522caeff7b6647d26981791d9fd9
133+
refs/heads/autosynth-firestore: 14d2eec96e61a15f6a6ac9a6ab5a2efa8b31253d
134134
refs/heads/autosynth-iot: 4025d1804241e74d54950a324dc4f667aeaad4b3
135135
refs/heads/autosynth-kms: 6b65b0f34c12d141031c7288cdc01e550212d0f6
136136
refs/heads/autosynth-language: e73905aa7672afa47240e65b25c087207f4594f9

branches/autosynth-firestore/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-firestore/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-firestore/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-firestore/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-firestore/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)