diff options
author | Thomas Watson | 2017-06-21 12:33:10 +0000 |
---|---|---|
committer | Thomas Watson | 2017-06-21 12:33:10 +0000 |
commit | 6064eac40ca2e51c69eea69fc3815fcde4253128 (patch) | |
tree | 3203819aa68c09c7dd8e09265003db16a124e0fd /bundles/org.eclipse.osgi.tests/src | |
parent | 8fe0bed86a3ffaf04a435eb95ba139b0c080e11e (diff) | |
download | rt.equinox.framework-6064eac40ca2e51c69eea69fc3815fcde4253128.tar.gz rt.equinox.framework-6064eac40ca2e51c69eea69fc3815fcde4253128.tar.xz rt.equinox.framework-6064eac40ca2e51c69eea69fc3815fcde4253128.zip |
Bug 518476 - Add test for INFO typeI20170621-2000
Change-Id: I564e48263436f0146c292e1fc53732a6fd209545
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/src')
-rw-r--r-- | bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java index 02127a689..26249d3b0 100644 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java @@ -172,7 +172,7 @@ public class LogReaderServiceTest extends AbstractBundleTests { public void testLogFrameworkEventType() throws Exception { final List<LogEntry> events = new CopyOnWriteArrayList<LogEntry>(); - final CountDownLatch countDown = new CountDownLatch(2); + final CountDownLatch countDown = new CountDownLatch(3); final Bundle b = getContext().getBundle(); LogListener listener = new LogListener() { @Override @@ -189,10 +189,14 @@ public class LogReaderServiceTest extends AbstractBundleTests { b.adapt(Module.class).getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, b.adapt(Module.class), new Exception()); //publishing an event with WARNING b.adapt(Module.class).getContainer().getAdaptor().publishContainerEvent(ContainerEvent.WARNING, b.adapt(Module.class), new Exception()); + //publishing an event with INFO + b.adapt(Module.class).getContainer().getAdaptor().publishContainerEvent(ContainerEvent.INFO, b.adapt(Module.class), new Exception()); + countDown.await(2, TimeUnit.SECONDS); - assertEquals("Wrong number of events", 2, events.size()); - assertEquals("Wrong type.", LogService.LOG_ERROR, events.get(0).getLevel()); - assertEquals("Wrong type.", LogService.LOG_WARNING, events.get(1).getLevel()); + assertEquals("Wrong number of events", 3, events.size()); + assertEquals("Wrong type.", LogLevel.ERROR, events.get(0).getLogLevel()); + assertEquals("Wrong type.", LogLevel.WARN, events.get(1).getLogLevel()); + assertEquals("Wrong type.", LogLevel.INFO, events.get(2).getLogLevel()); } |