This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new 8693331 Fix failing test for me on a less powerful Mac mini.
8693331 is described below
commit 8693331a2fbf2a7f4b04d631a74a09cc08fa6559
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Nov 9 10:04:35 2020 -0500
Fix failing test for me on a less powerful Mac mini.
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 1.8.0_272, vendor: AdoptOpenJDK, runtime:
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"
Model Name: Mac mini
Model Identifier: Macmini8,1
Processor Name: Quad-Core Intel Core i3
Processor Speed: 3.6 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 8 GB
---
.../java/org/apache/logging/log4j/core/config/TestConfigurator.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
index e6d8541..5963f81 100644
---
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
+++
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
@@ -261,14 +261,14 @@ public class TestConfigurator {
}
assertTrue(file.setLastModified(System.currentTimeMillis()),
"setLastModified should have succeeded.");
TimeUnit.SECONDS.sleep(config.getWatchManager().getIntervalSeconds()+1);
- for (int i = 0; i < 17; ++i) {
+ for (int i = 0; i < 100; ++i) {
logger.debug("Test message " + i);
}
// Sleep and check
- Thread.sleep(50);
+ Thread.sleep(100);
if (is(theInstance(config)).matches(ctx.getConfiguration())) {
- Thread.sleep(500);
+ Thread.sleep(2000);
}
final Configuration newConfig = ctx.getConfiguration();
assertThat("Configuration not reset", newConfig,
is(not(theInstance(config))));