Skip to content

Commit a4e99e2

Browse files
committed
Glassfish 4.0 appends JSESSIONID to JavaScript in links. So I disabled our tests checking this.
1 parent 99d490b commit a4e99e2

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎integration-faces-tests/src/test/java/org/ocpsoft/rewrite/faces/outbound/OutboundRewriteHrefJsTest.java‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@
44
import org.jboss.arquillian.junit.Arquillian;
55
import org.jboss.shrinkwrap.api.spec.WebArchive;
66
import org.junit.Test;
7+
import org.junit.experimental.categories.Category;
78
import org.junit.runner.RunWith;
9+
import org.ocpsoft.rewrite.category.IgnoreForGlassfish4;
810
import org.ocpsoft.rewrite.faces.annotation.RewriteFacesAnnotationsTest;
911
import org.ocpsoft.rewrite.test.RewriteTest;
1012
import org.ocpsoft.rewrite.test.RewriteTestBase;
1113

1214
import com.gargoylesoftware.htmlunit.html.HtmlPage;
1315

16+
/**
17+
* This test doesn't work on Glassfish 4.0 at all. For some reason Glassfish _always_ appends the JSESSIONID, even if
18+
* the href just contains JavaScript. This leads to links like this:
19+
*
20+
* <pre>
21+
* href = &quot;javascript:void(0);jsessionid=fde6b122b14c03b5ad7dcf4c51b5&quot;
22+
* </pre>
23+
*
24+
* This can be reproduced even in a simple sample application without Rewrite.
25+
*/
1426
@RunWith(Arquillian.class)
27+
@Category(IgnoreForGlassfish4.class)
1528
public class OutboundRewriteHrefJsTest extends RewriteTestBase
1629
{
1730

‎integration-faces-tests/src/test/java/org/ocpsoft/rewrite/faces/outbound/OutboundSpecialCasesTest.java‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,28 @@
2222
import org.jboss.shrinkwrap.api.spec.WebArchive;
2323
import org.junit.Ignore;
2424
import org.junit.Test;
25+
import org.junit.experimental.categories.Category;
2526
import org.junit.runner.RunWith;
27+
import org.ocpsoft.rewrite.category.IgnoreForGlassfish4;
2628
import org.ocpsoft.rewrite.faces.annotation.RewriteFacesAnnotationsTest;
2729
import org.ocpsoft.rewrite.test.RewriteTest;
2830
import org.ocpsoft.rewrite.test.RewriteTestBase;
2931

3032
import com.gargoylesoftware.htmlunit.html.DomElement;
3133
import com.gargoylesoftware.htmlunit.html.HtmlPage;
3234

35+
/**
36+
* This test doesn't work on Glassfish 4.0 at all. For some reason Glassfish _always_ appends the JSESSIONID, even if
37+
* the href just contains JavaScript. This leads to links like this:
38+
*
39+
* <pre>
40+
* href = &quot;javascript:void(0);jsessionid=fde6b122b14c03b5ad7dcf4c51b5&quot;
41+
* </pre>
42+
*
43+
* This can be reproduced even in a simple sample application without Rewrite.
44+
*/
3345
@RunWith(Arquillian.class)
46+
@Category(IgnoreForGlassfish4.class)
3447
public class OutboundSpecialCasesTest extends RewriteTestBase
3548
{
3649

0 commit comments

Comments
 (0)