Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging Freeplane - tests failing on nix-build #34741

Closed
freeman42x opened this issue Feb 8, 2018 · 2 comments
Closed

Packaging Freeplane - tests failing on nix-build #34741

freeman42x opened this issue Feb 8, 2018 · 2 comments

Comments

@freeman42x
Copy link
Contributor

I am trying to package Freeplane since it is based on Freemind and it is a very useful piece of software.

When running gradle dist by itself it succeeds to build without any failing tests.

The changed I made until now are here (freeplane branch): https://github.com/razvan-panda/nixpkgs/commits/freeplane

When running nix-build -A freeplane there will be 1 failing gradle test:

whenPopupMenuBecomesInvisible_popupListenerIsCalled

Wanted but not invoked:
entryPopupListener.childEntriesHidden(
Entry [name=menu, builders=[], attributes={component=javax.swing.JMenu[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.metal.MetalBorders$MenuItemBorder@1a82dc50,flags=256,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2],paintBorder=true,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=menu]}, childEntries=[Entry [name=action, builders=[], attributes={class org.freeplane.core.ui.AFreeplaneAction=Mock for AFreeplaneAction, hashCode: 1154046786}, childEntries=[]]]]
);
-> at org.freeplane.core.ui.menubuilders.menu.JMenuItemBuilderTest.whenPopupMenuBecomesInvisible_popupListenerIsCalled(JMenuItemBuilderTest.java:250)

However, there were other interactions with this mock:
entryPopupListener.childEntriesWillBecomeVisible(
Entry [name=menu, builders=[], attributes={component=javax.swing.JMenu[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.metal.MetalBorders$MenuItemBorder@1a82dc50,flags=256,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2],paintBorder=true,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=menu]}, childEntries=[Entry [name=action, builders=[], attributes={class org.freeplane.core.ui.AFreeplaneAction=Mock for AFreeplaneAction, hashCode: 1154046786}, childEntries=[]]]]
);
-> at org.freeplane.core.ui.menubuilders.menu.PopupMenuListenerForEntry.fireChildEntriesWillBecomeVisible(PopupMenuListenerForEntry.java:38)

entryPopupListener.childEntriesWillBecomeVisible(
Entry [name=action, builders=[], attributes={class org.freeplane.core.ui.AFreeplaneAction=Mock for AFreeplaneAction, hashCode: 1154046786}, childEntries=[]]
);
-> at org.freeplane.core.ui.menubuilders.menu.PopupMenuListenerForEntry.fireChildEntriesWillBecomeVisible(PopupMenuListenerForEntry.java:38)

at org.freeplane.core.ui.menubuilders.menu.JMenuItemBuilderTest.whenPopupMenuBecomesInvisible_popupListenerIsCalled(JMenuItemBuilderTest.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy1.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:146)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:128)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)

Any suggestions on how to proceed with packaging Freeplane? I couldn't find any way that does not involve modifying the source.

Ideally, it would be to figure out why the test is failing only under the context of nix-build but disabling the tests would suffice also.

  • system: "x86_64-linux"
  • host os: Linux 4.9.78, NixOS, 17.09.2905.c1d9aff56e0 (Hummingbird)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 1.11.16
  • channels(root): "nixos-17.09.2964.3e349a2b98b, nixpkgs-unstable-18.03pre127302.e860b651d6e, nixos-unstable-18.03pre118631.66b63d2f5a"
  • channels(neo): ""
  • nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@lheckemann
Copy link
Member

Fixed by freeplane/freeplane#94 AFAIU. Suggest close?

@Ekleog
Copy link
Member

Ekleog commented Dec 14, 2018

@razvan-panda The issue you mentioned appears to have been solved upstream, so 1.7.2 should work out of the box.

If you want, I think other people who want to use freeplane on nixos might be helped if you submitted a PR to nixpkgs adding it, and/or if you added it to your NUR repository.

Anyway, closing this for now, as it doesn't look like it can make significant progress :)

@Ekleog Ekleog closed this as completed Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants