[ https://issues.apache.org/jira/browse/BROOKLYN-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797629#comment-16797629 ]
Geoff Macartney commented on BROOKLYN-611: ------------------------------------------ A workaround has been applied [https://github.com/apache/brooklyn-server/pull/1050] to avoid the issue for now by moving the test to its own file, but it would be still something to fix. > testErrorsCaughtByApiAndRestApiWorks fails on OSX > ------------------------------------------------- > > Key: BROOKLYN-611 > URL: https://issues.apache.org/jira/browse/BROOKLYN-611 > Project: Brooklyn > Issue Type: Bug > Reporter: Geoff Macartney > Priority: Minor > > The unit test BrooklynLauncherTest.testErrorsCaughtByApiAndRestApiWorks fails > when building on OSX. Detective work by [~sjcorbett] has identified the > cause as noted in this comment - > [https://github.com/apache/brooklyn-server/pull/1049#issuecomment-471919561]: > ...turns out that it is a problem specifically on MacOS. It was introduced > when the version of {{felix.framework.version}} was bumped to {{5.6.10}}. > Long story short, this version changed how Felix framework handles extension > bundles. It appends bundles to the classpath as they're installed. > So when e.g. a test in {{org.apache.brooklyn.launcher.WebAppRunnerTest}} runs > all of the extension bundles are cached and added to the classpath. When the > test completes the cache directory is deleted. > But when a second test runs, EmbeddedFelixFramework discovers the bundles > from the last test which triggers: > |{{2018-11-30 16:43:44,041 WARN o.a.b.r.f.EmbeddedFelixFramework [main]: > Unable to install manifest from > jar:[file:/Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar!/META-INF/MANIFEST.MF:|file:///Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar!/META-INF/MANIFEST.MF:] > java.lang.IllegalStateException: Problem installing extension bundle > jar:[file:/Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar!/META-INF/MANIFEST.MF:|file:///Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar!/META-INF/MANIFEST.MF:] > java.io.FileNotFoundException: > /Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar (No > such file or directory) java.lang.IllegalStateException: Problem installing > extension bundle > jar:[file:/Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar!/META-INF/MANIFEST.MF:|file:///Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar!/META-INF/MANIFEST.MF:] > java.io.FileNotFoundException: > /Users/sam/.brooklyn/osgi/cache/wcx9QUag/bundle175/version0.0/bundle.jar (No > such file or directory) at > org.apache.brooklyn.rt.felix.EmbeddedFelixFramework.installExtensionBundle(EmbeddedFelixFramework.java:212) > [brooklyn-rt-felix-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.rt.felix.EmbeddedFelixFramework.installBootBundles(EmbeddedFelixFramework.java:143) > [brooklyn-rt-felix-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.rt.felix.EmbeddedFelixFramework.newFrameworkStarted(EmbeddedFelixFramework.java:106) > [brooklyn-rt-felix-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.rt.felix.EmbeddedFramework.getFramework(EmbeddedFramework.java:30) > [brooklyn-rt-felix-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.util.core.osgi.Osgis.getFramework(Osgis.java:301) > [brooklyn-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.core.mgmt.ha.OsgiManager.start(OsgiManager.java:273) > [brooklyn-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.core.mgmt.internal.LocalManagementContext.<init>(LocalManagementContext.java:184) > [brooklyn-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.launcher.common.BasicLauncher.initManagementContext(BasicLauncher.java:539) > [brooklyn-launcher-common-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.launcher.BrooklynLauncher.initManagementContext(BrooklynLauncher.java:241) > [classes/:na] at > org.apache.brooklyn.launcher.common.BasicLauncher.startPartOne(BasicLauncher.java:394) > [brooklyn-launcher-common-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.launcher.common.BasicLauncher.start(BasicLauncher.java:379) > [brooklyn-launcher-common-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT] at > org.apache.brooklyn.launcher.WebAppRunnerTest.testStartWithLauncher(WebAppRunnerTest.java:143) > [test-classes/:na] }}| > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)