New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Piranha fails to pass all OmniFaces tests - needs fixing #1622
Comments
This one
is Mojarra specific bug: eclipse-ee4j/mojarra#4913 I've already bypassed it for piranha for now: omnifaces/omnifaces@a0ae247 |
This one
was caused by presumption that all containers have at least a default mime mapping for "common" files (https://www.iana.org/assignments/media-types/media-types.xhtml), however this was not yet true for Piranha, so I've for now added it to web.xml of IT omnifaces/omnifaces@5c66cb8 |
This one
failed because Piranha's web.xml parser doesn't trim context param values before returning For the record, this was the context param involved in test:
|
This one
failed because of
coming from
So most probably WS container needs to be explicitly initialized for Piranha first in some way? |
These:
work fine for me on Piranha 21.4.0. |
This failed because it is now only included the tyrus-core, not tyrus-servlet, so it doesn't find the ServletContainerInitializer and doesn't start Tyrus. Probably there is an issue wrt to immutable set too. |
Ahh, I see, Piranha didn't ship with any WS container itself, it had to be installed via deployment. I've fixed the test dependency now, but it still fails, this time with
This issue suggests that Piranha is passing an immutable set of classes as 1st argument of |
This one
failed because piranha didn't send back any |
These
I've reproduced, but the code behind this is relatively complicated so I cannot "debug" it by just reading the code. I've not been able to debug Piranha logic yet, so I'll leave this for later. I can at least tell that this test is also failing in Liberty. It's basically related to using path parameters on a welcome file. In Piranha, the test is failing because the context path gets duplicated in request.getRequestURI(). I'm not sure yet if this is caused by OmniFaces or Piranha. |
Coming back to the MultiViewsIT, I've fixed the failing case in Liberty. It was caused because it unexpectedly returned an empty string as servlet path when no servlet is found for the request but there is a catch-all filter on /* (this is actually not per spec, it may only return empty string as servlet path when there is an actual servlet on /* ). Liberty has set the expected path in the path info, which is kind of reasonable, so I have work arounded that in OmniFaces: omnifaces/omnifaces@fbdfe7d But this is not the case in Piranha. Based on the observable symptoms it seems that it's explicitly setting the welcome file path as the path info of the request when no servlet is found, but the servlet path is non-empty. It shouldn't be doing that. I'm also noticing that the return values of the getRequestURI() and getRequestURL() methods seem to be composed based on getPathInfo() while it should really be the other way round; the getPathInfo() must be extracted from the incoming request URL (as set by the client), not be calculated internally. |
This issue is stale because it has been open 170 days with no activity. Remove stale label or comment or this will be closed in 10 days |
FYI: the following ones still fail in 21.12.0:
And I've been able to reproduce #1622 (comment), it basically boiled down to a XML parsing error on partial response so the new elements weren't at all applied to the HTML document. I have not debugged it yet. My educated guess would be that the |
Current state: https://github.com/omnifaces/omnifaces/blob/f19595baa1aa9e2da61e9ba059008b198298d31c/pom.xml#L994
And I've for CDNResourceHandlerIT simply bypassed Piranha's web.xml whitespace trimming bug: https://github.com/omnifaces/omnifaces/blob/069bff2b6295827996ef1b72e1d3f04f54f78993/src/test/resources/WEB-INF/web.xml/withCDNResources.xml#L25 although that should also have been fixed -- no one other server fails on this. As of now, SocketIT passes completely \o/ But apparently a new bug was introduced wrt error-page interpreting. The associated IT tests have previously passed successfully. The getRequestURL and flash cookie issues are also new but the associated IT tests didn't exist at the time when this issue ticket was opened. |
@BalusC Can you open issues for each of the 4 pending issues you mentioned above? It will make it easier for me to tackle them one by one. Thanks! |
Piranha currently does not pass all the OmniFaces tests.
The results are as of now:
OmniFaces tests can be executed from the root of the Piranha project using:
Debugging can be done by e.g. cd'ing into the
external/omnifaces/target/omnifaces-4.x
folder and executing:If needed, timeouts can be disabled in OmniFacesIT#init by adding:
The text was updated successfully, but these errors were encountered: