Skip to content

Commit 4dcce47

Browse files
cpovirksduskis
authored andcommitted
---
yaml --- r: 31061 b: refs/heads/autosynth-bigquerystorage c: 14d2eec h: refs/heads/master i: 31059: 825879d
1 parent 5ea0470 commit 4dcce47

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
@@ -123,7 +123,7 @@ refs/tags/v0.69.0: 78f67a29e8b9c46ba01de566a2eae0fd1c03edea
123123
refs/heads/autosynth-asset: bdb45634a0fe8f7a510692b56b31f5312e25f453
124124
refs/heads/autosynth-automl: 22f9dd5b6f5df8dbfa7da0126864d565229519b2
125125
refs/heads/autosynth-bigquerydatatransfer: 71b6b6d2a992d05999b53e6e130c4fc1c8c8b4d7
126-
refs/heads/autosynth-bigquerystorage: b36a621a0729522caeff7b6647d26981791d9fd9
126+
refs/heads/autosynth-bigquerystorage: 14d2eec96e61a15f6a6ac9a6ab5a2efa8b31253d
127127
refs/heads/autosynth-bigtable: 9e5429f45cf9face9fed585d0233534993e36b58
128128
refs/heads/autosynth-bigtable-admin: 6379a2bc712f2736c83de0e009b4d26da4fa82ca
129129
refs/heads/autosynth-containeranalysis: af5b804492292b43372c9fe00386696136ccae89

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