[forge-dev] Test testFindPlugin fails

Lincoln Baxter, III lincolnbaxter at gmail.com
Thu Nov 10 18:20:13 EST 2011


Hey Ivan!

I think these test failures are actually caused by a blind update that I
put in to the JavaParser (I can't do builds from my machine here.) But it
means that the tests need to be updated because the
getMethod().getReturnType() function actually behaves differently now.

Does that help?
~Lincoln

On Thu, Nov 10, 2011 at 11:27 PM, Ivan St. Ivanov
<ivan.st.ivanov at gmail.com>wrote:

> Hi Lincoln,
>
> After ignoring the failing tests, everything went fine. BTW I touched
> RestPluginTest as well:
>
>       assertEquals("java.util.List",
> endpoint.getMethod("listAll").getReturnType());
>       assertEquals("com.test.domain.User", endpoint.getMethod("findById",
> long.class).getReturnType());
>
> I'm pretty sure that the conditions may be much better, but I patched it
> quickly.
>
> I'd like to help somehow with solving the Scaffold test issues, but I
> don't know from where to start. It's apparently somewhere in the inputs to
> the shell, but how can I find out where?
>
> Cheers!
> Ivan
>
> On Thu, Nov 10, 2011 at 8:12 AM, Lincoln Baxter, III <
> lincolnbaxter at gmail.com> wrote:
>
>> Hey Ivan,
>>
>> This is a new test introduced recently. It's possible that something is
>> wrong. I haven't actually been able to run the build on my laptop since
>> upgrading to OSX lion, but i would just ignore this test for now and move
>> on.
>>
>> ~Lincoln
>>
>>
>> On Wed, Nov 9, 2011 at 11:33 PM, Ivan St. Ivanov <
>> ivan.st.ivanov at gmail.com> wrote:
>>
>>> Hi Lincoln,
>>>
>>> Deleting the file helped, thanks!
>>>
>>> Now I have another issue though :-(
>>>
>>> The test FacesScaffoldTest has the method setupScaffoldProject, which
>>> creates project and then sets up scaffolding by "passing" on the command
>>> line some parameters. Well, it seems that the list which is passed ("", "",
>>> "2", "", "", "") doesn't work. I see the following exception:
>>>
>>> java.lang.IllegalArgumentException: promptChoice() Cannot ask user to
>>> select from a list of nothing. Ensure you have values in your options list.
>>> at
>>> org.jboss.forge.shell.AbstractShellPrompt.promptChoiceTyped(AbstractShellPrompt.java:250)
>>>  at
>>> org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.promptChoiceTyped(ShellImpl$Proxy$_$$_WeldClientProxy.java)
>>> at
>>> org.jboss.forge.scaffold.faces.FacesScaffold.install(FacesScaffold.java:419)
>>>  at
>>> org.jboss.forge.project.BaseProject.performInstallation(BaseProject.java:266)
>>> at org.jboss.forge.project.BaseProject.installFacet(BaseProject.java:180)
>>>
>>>
>>> It seems that there is a question on the version of the faces
>>> scaffold FacesScaffold.java:419, but the queue input lines don't provide
>>> it. I tried with the following input:       queueInputLines("", "", "", "",
>>> "2", ""); But I was not successful. I ran the same sequence of commands on
>>> a forge distribution which I have installed (I guess it is Beta 3), but
>>> there the questions seem slightly different, so I can't figure out what and
>>> where is expected to be entered.
>>>
>>> Thanks,
>>> Ivan
>>>
>>>
>>>
>>> On Thu, Nov 10, 2011 at 12:01 AM, Lincoln Baxter, III <
>>> lincolnbaxter at gmail.com> wrote:
>>>
>>>> Hey Ivan!
>>>>
>>>> First, you should make sure that you are using Java version 6.0.24,
>>>> otherwise, the build will not succeed due to compilor errors. Also, with
>>>> regard to your DEFAULT_PLUGIN_REPO, just delete your ~/.forge/config file,
>>>> and this will be fixed.
>>>>
>>>> Let me know if this works,
>>>> ~Lincoln
>>>>
>>>> On Wed, Nov 9, 2011 at 10:56 PM, Ivan St. Ivanov <
>>>> ivan.st.ivanov at gmail.com> wrote:
>>>>
>>>>> Hi folks,
>>>>>
>>>>> I just fetched the latest version of forge. I launched maven build and
>>>>> it failed while building the forge shell project. One of the tests
>>>>> (ForgePluginTest::testFindPlugin) failed with the following exception:
>>>>>
>>>>> java.lang.RuntimeException: no default repository set: (to set, type:
>>>>> set DEFAULT_PLUGIN_REPO <repository>)
>>>>> at
>>>>> org.jboss.forge.shell.util.PluginUtil.getDefaultRepo(PluginUtil.java:62)
>>>>>  at
>>>>> org.jboss.forge.shell.util.PluginUtil.findPlugin(PluginUtil.java:73)
>>>>> at
>>>>> org.jboss.forge.shell.plugins.builtin.ForgePlugin.find(ForgePlugin.java:158)
>>>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>  at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>  at
>>>>> org.jboss.forge.shell.command.Execution.perform(Execution.java:147)
>>>>> at
>>>>> org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)
>>>>>  at
>>>>> org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)
>>>>> at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:716)
>>>>>  at
>>>>> org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.execute(ShellImpl$Proxy$_$$_WeldClientProxy.java)
>>>>> at
>>>>> org.jboss.forge.shell.test.plugins.builtin.ForgePluginTest.testFindPlugin(ForgePluginTest.java:41)
>>>>>
>>>>> I did a quick debug (the test failed in the IDE as well) and found
>>>>> that the ForgePlugin class under test is initialized with an Environment
>>>>> object that has an empty properties map. I tried to find out how the plugin
>>>>> gets initialized, but I got lost somewhere in the calls of the Weld library:
>>>>>
>>>>> from Execution::perform:90
>>>>>
>>>>>          Class<? extends Plugin> pluginType =
>>>>> command.getParent().getType();
>>>>>
>>>>>          Set<Bean<?>> beans = manager.getBeans(pluginType);
>>>>>          Bean<?> bean = manager.resolve(beans);
>>>>>
>>>>> However, I checked the CI server logs from today (
>>>>> http://ci.jboss.org/jenkins/view/Forge/job/Forge-CI/366/console). The
>>>>> build is broken, but the Forge shell project is built successfully.
>>>>>
>>>>> Is there anything wrong with my setup? Just for your information, I'm
>>>>> using Windows.
>>>>>
>>>>> Thanks and regards,
>>>>> Ivan
>>>>>
>>>>> P.S. BTW I get the same compilation error as Jenkins when I run the
>>>>> build with -DskipTests:
>>>>>
>>>>> [ERROR] COMPILATION ERROR : [INFO] -------------------------------------------------------------[ERROR] /mnt/hudson_workspace/workspace/Forge-CI/scaffold-faces/src/main/java/org/jboss/forge/scaffold/faces/metawidget/inspector/propertystyle/ForgePropertyStyle.java:[529,59] type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds T,java.lang.annotation.Annotation
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> forge-dev mailing list
>>>>> forge-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Lincoln Baxter, III
>>>> http://ocpsoft.com
>>>> http://scrumshark.com
>>>> "Keep it Simple"
>>>>
>>>> _______________________________________________
>>>> forge-dev mailing list
>>>> forge-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> forge-dev mailing list
>>> forge-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>
>>>
>>
>>
>> --
>> Lincoln Baxter, III
>> http://ocpsoft.com
>> http://scrumshark.com
>> "Keep it Simple"
>>
>> _______________________________________________
>> forge-dev mailing list
>> forge-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>>
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20111111/11275fc5/attachment-0001.html 


More information about the forge-dev mailing list