Skip to content

Commit 0bbc4da

Browse files
cpovirksduskis
authored andcommitted
---
yaml --- r: 29695 b: refs/heads/autosynth-pubsub c: 14d2eec h: refs/heads/master i: 29693: e967f9c 29691: aa9d783 29687: 4fe5601 29679: 92ecc31 29663: 8be9de8 29631: 7c6889e 29567: 8608f70 29439: 61163a9 29183: 1bb9d9b 28671: 0ab66f1
1 parent 45ec1c4 commit 0bbc4da

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
@@ -114,7 +114,7 @@ refs/tags/v0.67.0: 30b56f02092efc6f3c3667650ea8b8825003e0b7
114114
refs/heads/autosynth-compute: c0ad4e5b54b2b167d47e508ca215c039404837d3
115115
refs/heads/autosynth-container: e9a9a8564756e20770320ed54eafa867040a7690
116116
refs/heads/autosynth-monitoring: f3b29d97f847cecd186ec14aeee04a232aaf0e1b
117-
refs/heads/autosynth-pubsub: b36a621a0729522caeff7b6647d26981791d9fd9
117+
refs/heads/autosynth-pubsub: 14d2eec96e61a15f6a6ac9a6ab5a2efa8b31253d
118118
refs/heads/autosynth-video-intelligence: 82b145665822830c46d47eb8925edb2d842d6815
119119
refs/heads/autosynth-vision: 01ef61bcef344ceee0198f56f18bc1db20201261
120120
refs/heads/spanner: b01127f885b4611bf1852abb0ce481eeb7fcc131

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