You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/01/16 20:57:07 UTC
[tomcat] 02/02: Update tests after BZ 56320 changes (only open when
data to log)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 912abf63d51997be156ae52aac55bacb9ce27a87
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 16 20:56:51 2020 +0000
Update tests after BZ 56320 changes (only open when data to log)
---
test/org/apache/juli/TestFileHandler.java | 6 ++++++
test/org/apache/juli/TestFileHandlerNonRotatable.java | 3 +++
2 files changed, 9 insertions(+)
diff --git a/test/org/apache/juli/TestFileHandler.java b/test/org/apache/juli/TestFileHandler.java
index 1ca4675..d8840f9 100644
--- a/test/org/apache/juli/TestFileHandler.java
+++ b/test/org/apache/juli/TestFileHandler.java
@@ -78,6 +78,7 @@ public class TestFileHandler {
generateLogFiles(logsDir, PREFIX_1, SUFIX_1, 3);
FileHandler fh1 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_1, SUFIX_1, Integer.valueOf(2));
+ fh1.open();
Thread.sleep(1000);
@@ -94,6 +95,10 @@ public class TestFileHandler {
FileHandler fh2 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_1, SUFIX_2, Integer.valueOf(2));
FileHandler fh3 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_2, SUFIX_1, Integer.valueOf(2));
FileHandler fh4 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_3, SUFIX_1, Integer.valueOf(2));
+ fh1.open();
+ fh2.open();
+ fh3.open();
+ fh4.open();
Thread.sleep(1000);
@@ -110,6 +115,7 @@ public class TestFileHandler {
generateLogFiles(logsDir, PREFIX_1, SUFIX_1, 3);
FileHandler fh1 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_1, SUFIX_1, null);
+ fh1.open();
Thread.sleep(1000);
diff --git a/test/org/apache/juli/TestFileHandlerNonRotatable.java b/test/org/apache/juli/TestFileHandlerNonRotatable.java
index 5b91245..a5affe8 100644
--- a/test/org/apache/juli/TestFileHandlerNonRotatable.java
+++ b/test/org/apache/juli/TestFileHandlerNonRotatable.java
@@ -55,6 +55,7 @@ public class TestFileHandlerNonRotatable extends LoggingBaseTest {
public void testBug61232() throws Exception {
testHandler = new FileHandler(this.getTemporaryDirectory().toString(),
"juli.", ".log");
+ testHandler.open();
File logFile = new File(this.getTemporaryDirectory(), "juli.log");
Assert.assertTrue(logFile.exists());
@@ -64,6 +65,7 @@ public class TestFileHandlerNonRotatable extends LoggingBaseTest {
public void testCustomSuffixWithoutSeparator() throws Exception {
testHandler = new FileHandler(this.getTemporaryDirectory().toString(),
"juli.", "log");
+ testHandler.open();
File logFile = new File(this.getTemporaryDirectory(), "juli.log");
Assert.assertTrue(logFile.exists());
@@ -73,6 +75,7 @@ public class TestFileHandlerNonRotatable extends LoggingBaseTest {
public void testCustomPrefixWithoutSeparator() throws Exception {
testHandler = new FileHandler(this.getTemporaryDirectory().toString(),
"juli", ".log");
+ testHandler.open();
File logFile = new File(this.getTemporaryDirectory(), "juli.log");
Assert.assertTrue(logFile.exists());
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org