JAVA-11489 Removed a test that was designed to run for 50 seconds to a
new Manual Test class
This commit is contained in:
parent
e1c046fcab
commit
851c7d933e
@ -5,7 +5,6 @@ import com.google.common.flogger.LoggerConfig;
|
||||
import com.google.common.flogger.StackSize;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
@ -25,13 +24,6 @@ public class FloggerIntegrationTest {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenATimeInterval_shouldLogAfterEveryTimeInterval() {
|
||||
IntStream.range(0, 1_000_0000).forEach(value -> {
|
||||
logger.atInfo().atMostEvery(10, TimeUnit.SECONDS).log("This log shows [every 10 seconds] => %d", value);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAnObject_shouldLogTheObject() {
|
||||
User user = new User();
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.baeldung.flogger;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
|
||||
public class FloggerManualTest {
|
||||
static {
|
||||
// System.setProperty("flogger.backend_factory", "com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance");
|
||||
System.setProperty("flogger.backend_factory",
|
||||
"com.google.common.flogger.backend.slf4j.Slf4jBackendFactory#getInstance");
|
||||
}
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
@Test
|
||||
public void givenATimeInterval_shouldLogAfterEveryTimeInterval() {
|
||||
IntStream.range(0, 1_000_0000).forEach(value -> {
|
||||
logger.atInfo().atMostEvery(10, TimeUnit.SECONDS).log("This log shows [every 10 seconds] => %d", value);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user