diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSetImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSetImpl.java index c68b75575b..28c742e67d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSetImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSetImpl.java @@ -470,14 +470,14 @@ public void run() { // Non-streaming result sets do not trigger this callback, and for those result sets, we // need to eagerly start the ProduceRowsRunnable. synchronized (monitor) { -// if (state == State.STREAMING_IN_PROGRESS -// || state == State.RUNNING -// || state == State.CONSUMING) { -// return; -// } -// if (state == State.STREAMING_INITIALIZED) { -// state = State.STREAMING_IN_PROGRESS; -// } + // if (state == State.STREAMING_IN_PROGRESS + // || state == State.RUNNING + // || state == State.CONSUMING) { + // return; + // } + // if (state == State.STREAMING_INITIALIZED) { + // state = State.STREAMING_IN_PROGRESS; + // } if (!initiateStreaming(AsyncResultSetImpl.this)) { initiateProduceRows(); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java index 17cbfa87e2..6a79454ee4 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java @@ -2000,7 +2000,8 @@ private void ensureMostRecentTransaction(Session session, ByteString transaction if (index > -1) { long id = Long.parseLong(transactionId.toStringUtf8().substring(index + 1)); if (id != counter.get()) { - System.out.printf("Session ID %s TransactionId %s\n", session.getName(), transactionId.toStringUtf8()); + System.out.printf( + "Session ID %s TransactionId %s\n", session.getName(), transactionId.toStringUtf8()); throw Status.FAILED_PRECONDITION .withDescription( String.format(