[JBoss JIRA] (FORGE-2144) Adding powermock rule into the test will cause forge to be unable to find it
by Matej Briskar (JIRA)
[ https://issues.jboss.org/browse/FORGE-2144?page=com.atlassian.jira.plugin... ]
Matej Briskar updated FORGE-2144:
---------------------------------
Description:
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
The difference is in the registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.
Recently, there was added another way of running the powermock along arquillian using java agent, even though it is not easy to make this work, it looks it fails on same error.
Error:
java.lang.IllegalStateException: Test runner could not locate test class [org.jboss.windup.rules.java.NotUnzippableFileTest] in any deployed Addon.
was:
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
The difference is in the registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.
Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.
> Adding powermock rule into the test will cause forge to be unable to find it
> ----------------------------------------------------------------------------
>
> Key: FORGE-2144
> URL: https://issues.jboss.org/browse/FORGE-2144
> Project: Forge
> Issue Type: Bug
> Reporter: Matej Briskar
>
> Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
> The difference is in the registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.
> Recently, there was added another way of running the powermock along arquillian using java agent, even though it is not easy to make this work, it looks it fails on same error.
> Error:
> java.lang.IllegalStateException: Test runner could not locate test class [org.jboss.windup.rules.java.NotUnzippableFileTest] in any deployed Addon.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 2 months
[JBoss JIRA] (FORGE-2145) NullPointerException when trying to open in IDEA 14.0.1 with JDK 1.7.0
by James Strachan (JIRA)
James Strachan created FORGE-2145:
-------------------------------------
Summary: NullPointerException when trying to open in IDEA 14.0.1 with JDK 1.7.0
Key: FORGE-2145
URL: https://issues.jboss.org/browse/FORGE-2145
Project: Forge
Issue Type: Bug
Components: UI - IntelliJ IDEA
Reporter: James Strachan
using 14.0.1 of IDEA Ultimate and JDK 1.7.0 after following these instructions
https://intellij-support.jetbrains.com/entries/23455956-Selecting-the-JDK...
I get this track trace below.
I added "1.7*" to the Info.plist as described above. In IDEA -> About it says "jdk 1.7.0_60-ea-b15". No idea where that comes from.
{code}
$ java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mod
jstrachan (master):/java-workspace/hawtio/hawtio-web/$ ls -al /Library/Java/JavaVirtualMachines/
total 32
drwxr-xr-x 12 root wheel 408 13 Nov 15:53 .
drwxrwxr-x 7 root admin 238 25 Oct 2013 ..
lrwxr-xr-x 1 root wheel 20 6 Feb 2012 1.6.0.jdk -> 1.6.0_29-b11-402.jdk
drwxr-xr-x 3 root wheel 102 1 Nov 2011 1.6.0_29-b11-402.jdk
lrwxr-xr-x 1 root wheel 15 13 Nov 15:53 1.7.0.jdk -> jdk1.7.0_60.jdk
drwxr-xr-x@ 4 root wheel 136 12 Jul 2012 1.8.0-lambda.jdk
lrwxr-xr-x 1 root wheel 15 29 Apr 2014 jdk1.7.0 -> jdk1.7.0_55.jdk
drwxr-xr-x 3 root wheel 102 29 Apr 2014 jdk1.7.0_55.jdk
drwxr-xr-x 4 root wheel 136 13 Nov 15:53 jdk1.7.0_60.jdk
lrwxr-xr-x 1 root wheel 15 23 Jun 08:35 jdk1.8.0 -> jdk1.8.0_05.jdk
drwxr-xr-x 3 root wheel 102 23 Jun 08:34 jdk1.8.0_05.jdk
{code}
The exception is:
{code}
java.lang.NullPointerException
at org.jboss.forge.plugin.idea.service.ForgeService.locateNativeClass(ForgeService.java:124)
at org.jboss.forge.plugin.idea.context.UIContextFactory.getResourceConverter(UIContextFactory.java:76)
at org.jboss.forge.plugin.idea.context.UIContextFactory.filesToResources(UIContextFactory.java:63)
at org.jboss.forge.plugin.idea.context.UIContextFactory.getSelection(UIContextFactory.java:51)
at org.jboss.forge.plugin.idea.context.UIContextFactory.create(UIContextFactory.java:36)
at org.jboss.forge.plugin.idea.service.callbacks.CommandListPopupCallBack.run(CommandListPopupCallBack.java:37)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 2 months
[JBoss JIRA] (FORGE-2144) Adding powermock rule into the test will cause forge to be unable to find it
by Matej Briskar (JIRA)
[ https://issues.jboss.org/browse/FORGE-2144?page=com.atlassian.jira.plugin... ]
Matej Briskar updated FORGE-2144:
---------------------------------
Description:
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
The difference is in the registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.
Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.
was:
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.
> Adding powermock rule into the test will cause forge to be unable to find it
> ----------------------------------------------------------------------------
>
> Key: FORGE-2144
> URL: https://issues.jboss.org/browse/FORGE-2144
> Project: Forge
> Issue Type: Bug
> Reporter: Matej Briskar
>
> Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
> The difference is in the registry.getExportedInstance() for the _DEFAULT_ addon. In one it returns the class, in the other it does not.
> Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 2 months
[JBoss JIRA] (FORGE-2144) Adding powermock rule into the test will cause forge to be unable to find it
by Matej Briskar (JIRA)
[ https://issues.jboss.org/browse/FORGE-2144?page=com.atlassian.jira.plugin... ]
Matej Briskar updated FORGE-2144:
---------------------------------
Description:
Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.
was:Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
> Adding powermock rule into the test will cause forge to be unable to find it
> ----------------------------------------------------------------------------
>
> Key: FORGE-2144
> URL: https://issues.jboss.org/browse/FORGE-2144
> Project: Forge
> Issue Type: Bug
> Reporter: Matej Briskar
>
> Powermock is a framework for mocking static methods (this is a tricky thing to do). By default you will run it using @RunWith annotation, however since the arquillian has it's own @RunWith(Arquillian.class) annotation, it provides an option to use the mocking using the junit.Rule. This, however, makes the tests fail.
> Recently, there was added another way of running the powermock along arquillian using java agent, so users of this framework will still have hope within forge testing. Haven't tried it yet.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 2 months