OsgiBundleTest Class — netty Architecture
Architecture documentation for the OsgiBundleTest class in OsgiBundleTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 6dcdd75c_1bcf_0e7a_6cd9_70f98dbea703["OsgiBundleTest"] aae156e2_44d7_a593_f922_8983d84a793d["OsgiBundleTest.java"] 6dcdd75c_1bcf_0e7a_6cd9_70f98dbea703 -->|defined in| aae156e2_44d7_a593_f922_8983d84a793d d04e62d0_1d82_5b85_73c4_b482e23c85b2["config()"] 6dcdd75c_1bcf_0e7a_6cd9_70f98dbea703 -->|method| d04e62d0_1d82_5b85_73c4_b482e23c85b2 6ce2442b_4cd1_7011_836d_f35ab5f2387c["testResolvedBundles()"] 6dcdd75c_1bcf_0e7a_6cd9_70f98dbea703 -->|method| 6ce2442b_4cd1_7011_836d_f35ab5f2387c 7a6dc696_ce86_0fbd_9049_9449b69d73d2["testCanLoadPlatformDependent()"] 6dcdd75c_1bcf_0e7a_6cd9_70f98dbea703 -->|method| 7a6dc696_ce86_0fbd_9049_9449b69d73d2
Relationship Graph
Source Code
testsuite-osgi/src/test/java/io/netty/osgitests/OsgiBundleTest.java lines 40–89
@RunWith(PaxExam.class)
public class OsgiBundleTest {
private static final Collection<String> LINKS;
static {
final Set<String> links = new HashSet<String>();
final File directory = new File("target/generated-test-resources/alta/");
File[] files = directory.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return (name.startsWith("io.netty") || name.startsWith("com.barchart.udt")) && name.endsWith(".link");
}
});
if (files == null) {
throw new IllegalStateException(directory + " is not found or is not a directory");
}
for (File f: files) {
links.add(f.getName());
}
LINKS = links;
}
@Configuration
public final Option[] config() {
final Collection<Option> options = new ArrayList<Option>();
// Avoid boot delegating sun.misc which would fail testCanLoadPlatformDependent()
options.add(frameworkProperty(FRAMEWORK_BOOTDELEGATION).value("com.sun.*"));
options.add(systemProperty("pax.exam.osgi.unresolved.fail").value("true"));
options.add(junitBundles());
for (String link : LINKS) {
options.add(url("link:classpath:" + link));
}
return options.toArray(new Option[0]);
}
@Test
public void testResolvedBundles() {
// No-op, as we just want the bundles to be resolved. Just check if we tested something
assertFalse("At least one bundle needs to be tested", LINKS.isEmpty());
}
@Test
public void testCanLoadPlatformDependent() {
assertFalse(PlatformDependent.addressSize() == 0);
}
}
Source
Frequently Asked Questions
What is the OsgiBundleTest class?
OsgiBundleTest is a class in the netty codebase, defined in testsuite-osgi/src/test/java/io/netty/osgitests/OsgiBundleTest.java.
Where is OsgiBundleTest defined?
OsgiBundleTest is defined in testsuite-osgi/src/test/java/io/netty/osgitests/OsgiBundleTest.java at line 40.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free