timothyjward commented on code in PR #403:
URL: https://github.com/apache/felix-dev/pull/403#discussion_r2036915380
##########
framework/src/test/java/org/apache/felix/framework/BundleWiringImplTest.java:
##########
@@ -408,23 +380,23 @@ public void testFirstGeneratedAccessorSkipClassloading()
throws Exception
when(bundleWiring.getBundle().getFramework()).thenReturn(mockFramework);
BundleClassLoader bundleClassLoader = createBundleClassLoader(
- BundleClassLoader.class, bundleWiring);
- assertNotNull(bundleClassLoader);
+ BundleClassLoader.class, bundleWiring);
+ assertThat(bundleClassLoader).isNotNull();
try {
- bundleClassLoader.loadClass(classToBeLoaded, true);
- fail();
+ bundleClassLoader.loadClass(classToBeLoaded, true);
+ fail("");
} catch (ClassNotFoundException cnf) {
//this is expected
//make sure boot delegation was done before CNF was thrown
- verify(mockFramework).getBootPackages();
-
- //make sure the class is added to the skip class cache
- assertEquals(getAccessorCache(bundleWiring).get(classToBeLoaded),
BundleWiringImpl.CNFE_CLASS_LOADER);
+ verify(mockFramework).getBootPackages();
+
+ //make sure the class is added to the skip class cache
+
assertThat(getAccessorCache(bundleWiring)).containsEntry(classToBeLoaded,
BundleWiringImpl.CNFE_CLASS_LOADER);
} catch (Exception e) {
- e.printStackTrace();
- fail();
+ e.printStackTrace();
+ fail("");
Review Comment:
```suggestion
fail("An unexpected failure occurred" + e.getMessage());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]