From dc0422bd8556009c0b12427c256b044a1a027c8a Mon Sep 17 00:00:00 2001 From: Sakthivel Subramanian Date: Mon, 6 Jan 2025 15:32:25 +0530 Subject: [PATCH] Add more logs --- .../spanner/RetryOnInvalidatedSessionTest.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java index 8e628b43d4..0292abbce2 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java @@ -85,12 +85,11 @@ public Long apply(StructReader input) { public boolean failOnInvalidatedSession; @Rule - public TestRule watcher = - new TestWatcher() { - protected void starting(Description description) { - System.out.println("Starting test: " + description.getMethodName()); - } - }; + public TestRule watcher = new TestWatcher() { + protected void starting(Description description) { + System.out.println("Starting test: " + description.getMethodName()); + } + }; @Parameters(name = "fail on invalidated session = {0}") public static Collection data() { @@ -223,10 +222,8 @@ public void setUp() throws InterruptedException { != failOnInvalidatedSession) { System.out.println("Recreating spanner instance"); if (spanner != null) { - System.out.printf( - "Closing the spanner instance %s %s", - spanner.getOptions().getSessionPoolOptions().isFailIfSessionNotFound(), - failOnInvalidatedSession); + System.out.printf("Closing the spanner instance %s %s", + spanner.getOptions().getSessionPoolOptions().isFailIfSessionNotFound(), failOnInvalidatedSession); spanner.close(); } SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder().setFailOnSessionLeak();