8154707: java/util/ServiceLoader/modules/BasicTest.java failing

Reviewed-by: chegar
This commit is contained in:
Alan Bateman 2016-04-20 16:47:12 +01:00
parent 187b51a62c
commit 611a14587e

@ -30,11 +30,11 @@ import static org.testng.Assert.*;
/*
* @test
* @run testng BasicTest
* @run testng MiscTests
* @summary Basic test of ServiceLoader with modules
*/
public class BasicTest {
public class MiscTests {
@Test
public void testEmptyLayer() {
@ -43,18 +43,6 @@ public class BasicTest {
assertFalse(sl.iterator().hasNext());
}
@Test
public void testBootLayer() {
ServiceLoader<Provider> sl
= ServiceLoader.load(Layer.boot(), Provider.class);
boolean found = false;
for (Provider provider : sl) {
if (provider.getName().equals("SunJCE"))
found = true;
}
assertTrue(found);
}
@Test(expectedExceptions = { NullPointerException.class })
public void testNullLayer() {
ServiceLoader.load(null, Provider.class);