Skip to content

Commit c8d145b

Browse files
authored
test: do not show unnecessary BatcherImplTest logging (#2519)
This is the follow-up of a pull request #2285, where we wanted to catch any flaky test failure with logging, just in case the test failed again. https://github.com/googleapis/sdk-platform-java/pull/2285/files#r1416300479 It turned out that the fix worked well. We don't observe the test failures any more. Therefore turning off the excessive logging.
1 parent 7c09e23 commit c8d145b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

gax-java/gax/src/test/java/com/google/api/gax/batching/BatcherImplTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ public void testThrottlingBlocking() throws Exception {
873873
public void run() {
874874
batcherAddThreadHolder.add(Thread.currentThread());
875875
batcher.add(1);
876-
logger.info("Called batcher.add(1)");
876+
logger.fine("Called batcher.add(1)");
877877
}
878878
});
879879

@@ -893,20 +893,20 @@ public void run() {
893893
() -> {
894894
try {
895895
Thread.sleep(throttledTime);
896-
logger.info("Calling flowController.release");
896+
logger.fine("Calling flowController.release");
897897
flowController.release(1, 1);
898-
logger.info("Called flowController.release");
898+
logger.fine("Called flowController.release");
899899
} catch (InterruptedException e) {
900900
}
901901
});
902902

903903
try {
904-
logger.info("Calling future.get(10 ms)");
904+
logger.fine("Calling future.get(10 ms)");
905905
future.get(10, TimeUnit.MILLISECONDS);
906906
long afterGetCall = System.currentTimeMillis();
907907
long actualWaitTimeMs = afterGetCall - beforeGetCall;
908908

909-
logger.info("future.get(10 ms) unexpectedly returned. Wait time: " + actualWaitTimeMs);
909+
logger.fine("future.get(10 ms) unexpectedly returned. Wait time: " + actualWaitTimeMs);
910910
// In a flaky test troubleshooting
911911
// (https://github.com/googleapis/sdk-platform-java/issues/1931), we observed that
912912
// "future.get" method did not throw TimeoutException in this multithreaded test.
@@ -919,7 +919,7 @@ public void run() {
919919
.isAtLeast(10);
920920
} catch (TimeoutException e) {
921921
// expected
922-
logger.info("future.get(10 ms) timed out expectedly.");
922+
logger.fine("future.get(10 ms) timed out expectedly.");
923923
}
924924

925925
try {

0 commit comments

Comments
 (0)