Skip to content

Commit 8246a37

Browse files
committed
Print both the environment within the test and in the forked process
1 parent 09dc4a1 commit 8246a37

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

containers/pax-exam-container-forked/src/test/java/org/ops4j/pax/exam/forked/ForkedTestContainerFactoryTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ public void startWithBootClasspath(UrlReference url) throws BundleException,
115115
Assert.assertNotNull(containers);
116116
Assert.assertNotNull(containers[0]);
117117

118+
System.getenv().forEach((key, value) -> System.out.printf("TEST_ENVIRONMENT %s=%s%n", key, value));
119+
118120
ForkedTestContainer container = (ForkedTestContainer) containers[0];
119121
container.start();
120122

@@ -146,8 +148,7 @@ public static class ClasspathTestActivator implements BundleActivator {
146148

147149
@Override
148150
public void start(BundleContext bc) throws Exception {
149-
System.out.println("PRINT_ENVIRONMENT_VARIABLES");
150-
System.getenv().forEach((key, value) -> System.out.printf("%s=%s%n", key, value));
151+
System.getenv().forEach((key, value) -> System.out.printf("FORKED_ENVIRONMENT %s=%s%n", key, value));
151152

152153
Class<?> clazz = getClass().getClassLoader().loadClass(className);
153154

0 commit comments

Comments
 (0)