mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch 'origin/GP-3615-dragonmacher-test-logging-improvements--SQUASHED'
This commit is contained in:
commit
46ecc7dbf0
9 changed files with 170 additions and 105 deletions
|
@ -23,8 +23,7 @@ import java.util.List;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.logging.log4j.*;
|
||||
import org.apache.logging.log4j.core.config.Configurator;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.junit.*;
|
||||
|
||||
import generic.concurrent.GThreadPool;
|
||||
|
@ -46,7 +45,6 @@ public class GTaskTest extends AbstractGenericTest {
|
|||
};
|
||||
|
||||
public GTaskTest() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Before
|
||||
|
@ -420,8 +418,7 @@ public class GTaskTest extends AbstractGenericTest {
|
|||
public void testExceptionInTaskListenerTaskCompleted() {
|
||||
|
||||
// disable printing of exception below
|
||||
Logger logger = LogManager.getLogger(GTaskManager.class);
|
||||
Configurator.setLevel(logger.getName(), Level.OFF);
|
||||
setLogLevel(GTaskManager.class, Level.OFF);
|
||||
|
||||
gTaskManager.addTaskListener(new GTaskListenerAdapter() {
|
||||
@Override
|
||||
|
@ -434,16 +431,13 @@ public class GTaskTest extends AbstractGenericTest {
|
|||
|
||||
// this is testing that the exception does cause the taskManager to timeout still busy
|
||||
waitForTaskManager();
|
||||
|
||||
Configurator.setLevel(logger.getName(), Level.DEBUG);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExceptionInTaskListenerTaskStarted() {
|
||||
|
||||
// disable printing of exception below
|
||||
Logger logger = LogManager.getLogger(GTaskManager.class);
|
||||
Configurator.setLevel(logger.getName(), Level.OFF);
|
||||
setLogLevel(GTaskManager.class, Level.OFF);
|
||||
|
||||
gTaskManager.addTaskListener(new GTaskListenerAdapter() {
|
||||
@Override
|
||||
|
@ -456,8 +450,6 @@ public class GTaskTest extends AbstractGenericTest {
|
|||
|
||||
// this is testing that the exception does cause the taskManager to timeout still busy
|
||||
waitForTaskManager();
|
||||
|
||||
Configurator.setLevel(logger.getName(), Level.DEBUG);
|
||||
}
|
||||
|
||||
private void cancelCurrentTask() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue