From 3bdc778d332518918b4e575ba57b18c5e644e2fd Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 17 May 2024 12:07:33 -0400 Subject: [PATCH] chore: Migrate tests off TextPrinter's deprecated methods --- .../it/ITBigQueryStorageLongRunningTest.java | 2 +- .../v1beta1/it/ITBigQueryStorageTest.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageLongRunningTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageLongRunningTest.java index 5043c60446..b49e1c252f 100644 --- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageLongRunningTest.java +++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageLongRunningTest.java @@ -102,7 +102,7 @@ public void testLongRunningReadSession() throws InterruptedException, ExecutionE assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 5, session.getStreamsCount()); diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java index 68777c386f..26cab629b3 100644 --- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java +++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/it/ITBigQueryStorageTest.java @@ -207,7 +207,7 @@ public void testSimpleRead() { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -246,7 +246,7 @@ public void testSimpleReadArrow() { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -300,7 +300,7 @@ public void testRangeType() throws InterruptedException { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -337,7 +337,7 @@ public void testSimpleReadAndResume() { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -388,7 +388,7 @@ public void testFilter() throws IOException { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -451,7 +451,7 @@ public void testColumnSelection() throws IOException { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -1079,7 +1079,7 @@ public void testUniverseDomainWithMatchingDomain() throws IOException { assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount()); @@ -1208,7 +1208,7 @@ private void ProcessRowsAtSnapshot( assertEquals( String.format( "Did not receive expected number of streams for table reference '%s' CreateReadSession response:%n%s", - TextFormat.shortDebugString(tableReference), session.toString()), + TextFormat.printer().shortDebugString(tableReference), session.toString()), 1, session.getStreamsCount());