--- a/hotspot/test/serviceability/logging/TestLogRotation.java Mon Apr 11 20:38:38 2016 -0700
+++ b/hotspot/test/serviceability/logging/TestLogRotation.java Thu Apr 14 17:42:29 2016 -0700
@@ -102,8 +102,10 @@
smallFilesNumber++;
}
}
- if (logs.length != numberOfFiles) {
- throw new Error("There are only " + logs.length + " logs instead " + numberOfFiles);
+ // Expect one more log file since the number-of-files doesn't include the active log file
+ int expectedNumberOfFiles = numberOfFiles + 1;
+ if (logs.length != expectedNumberOfFiles) {
+ throw new Error("There are " + logs.length + " logs instead of the expected " + expectedNumberOfFiles);
}
if (smallFilesNumber > 1) {
throw new Error("There should maximum one log with size < " + logFileSizeK + "K");