8154707: java/util/ServiceLoader/modules/BasicTest.java failing
Reviewed-by: chegar
This commit is contained in:
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);
|
Loading…
x
Reference in New Issue
Block a user