File tree Expand file tree Collapse file tree
integration-tests/jakarta-ee/src/test/java/org/apache/shiro/testing/jakarta/ee Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414package org .apache .shiro .testing .jakarta .ee ;
1515
1616import java .net .URL ;
17+ import java .util .Arrays ;
1718
1819import static org .apache .shiro .ee .util .JakartaTransformer .isJakarta ;
1920import static org .apache .shiro .ee .util .JakartaTransformer .jakartify ;
@@ -122,9 +123,13 @@ void checkDontCallWhenNotAuth() {
122123 "anonymous user should get an exception" );
123124 webDriver .get (baseURL + "lastException" );
124125 String exceptionText = webDriver .findElement (By .tagName ("body" )).getText ();
125- assertTrue (exceptionText
126+ // Workaround for Payara 5 only: Filter out lines with 'Unsupported class file major version XX'
127+ String filteredExceptionText = Arrays .stream (exceptionText .split ("\\ n" ))
128+ .filter (line -> !line .contains ("Unsupported class file major version" ))
129+ .reduce ("" , (a , b ) -> a .isEmpty () ? b : a + "\n " + b );
130+ assertTrue (filteredExceptionText
126131 .startsWith (jakartify ("WARNING: javax.ejb.EJBException: Attempting to perform a user-only operation" )),
127- String .format ("capturing correct warning from the server: %s" , exceptionText ));
132+ String .format ("capturing correct warning from the server: %s" , filteredExceptionText ));
128133 }
129134
130135 @ Test
Original file line number Diff line number Diff line change 122122 <guice .version>4.2.3</guice .version>
123123 <jaxrs .api.version>2.1.6</jaxrs .api.version>
124124 <htmlunit .version>4.21.0</htmlunit .version>
125- <bouncycastle .version>1.82 </bouncycastle .version>
125+ <bouncycastle .version>1.84 </bouncycastle .version>
126126
127127 <!-- Test 3rd-party dependencies: -->
128128 <easymock .version>5.6.0</easymock .version>
You can’t perform that action at this time.
0 commit comments