[seam-dev] s:viewAction test failure

Brian Leathem bleathem at gmail.com
Tue Jul 26 14:03:51 EDT 2011


Update:

I had a conversation with Ed Burns and Pete Muir on IRC just now, and we 
concluded that this problem is caused by making a re-entrant call on the 
thread to the faces lifecycle.

I've summarized the conversation and some further updates in the 
corresponding jira issue:
https://issues.jboss.org/browse/SEAMFACES-179

Brian

(Also note: the WELD issue I linked to previously is unrelated to the 
issue I'm observing)

On 11-07-26 08:13 AM, Brian Leathem wrote:
> Hello all,
>
> I've written some JSFUnit/Arquillian tests for the viewAction, 
> currently targeting JBoss AS6 as a baseline.
> There are two tests (available in faces/fetaure/jsfunit_arquillian 
> branch):
>     // testing the viewAction loading data into a property
>     @Test
>     @InitialPage("/load_data.xhtml")
>     public void checkDataLoad(JSFServerSession server,
> JSFClientSession client) throws IOException {
>         Assert.assertEquals("/load_data.xhtml", 
> server.getCurrentViewID());
>         Assert.assertTrue(client.getPageAsText().contains("Data 
> Loaded"));
>     }
>
>     // testing viewAction navigation
>     @Test
>     @InitialPage("/goto_result.xhtml")
>     public void checkNavigation(JSFServerSession server,
> JSFClientSession client) throws IOException {
>         Assert.assertEquals("/result.xhtml", server.getCurrentViewID());
>         Assert.assertTrue(client.getPageAsText().contains("Result 
> page"));
>     }
>
> The first test works, but the second one fails with the server.log 
> stacktrace:
> https://gist.github.com/1078369
> I verified this failure with a manually created example app (available
> in faces/examples on the develop branch).
>
> This is consistent with the behavior reported in the forums:
> s:viewAction navigation is broken.  It seems to be a weld issue,
> perhaps:
> https://issues.jboss.org/browse/WELD-878
> although the error message seems different.
>
> This is an increasingly important at the moment, as the viewAction is 
> being considered for inclusion in JSF 2.2.
>
> Any thoughts on how to proceed?  It's hard to share these tests at the
> moment, as they are based on a JSFUnit snapshot that one must compile
> onself.  Another JSFUnit beta realease would help out here.  Also, It 
> would probably help to have these tests target other containers, such 
> as AS7, Glassfish 3.x - although I think JSFUnit/Arquillian has some 
> compatibility issues here at the moment.
>
> Cheers,
> Brian Leathem



More information about the seam-dev mailing list