Comments (16)
Or maybe
ServletContext.getContext(String)
returningnull
should/could be this flag (so we have something to fix in Jetty 12 ;))
Perhaps calling servletContent.getContext(ServletContext.getContextPath())
would be a good way to test if the container supports cross context dispatch or not?
from servlet.
@markt-asf What is the status of this issue?
from servlet.
The test can be excluded for now and we'll fix it for 6.1.
from servlet.
There are a lot more cross-context tests, shouldn't these also be fixed?:
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.dispatchAfterCommitTest4
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.dispatchAfterCommitTest5
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.dispatchReturnTest4
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.dispatchReturnTest5
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.negativeDispatchTest12
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.negativeDispatchTest13
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.negativeDispatchTest8
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.negativeDispatchTest9
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.startAsyncAgainTest12
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.startAsyncAgainTest13
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.startAsyncAgainTest14
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.startAsyncAgainTest15
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.startAsyncAgainTest16
com/sun/ts/tests/servlet/api/jakarta_servlet/dispatchtest/URLClient.java.startAsyncAgainTest17
from servlet.
Should the tests be modified to succeed if they get a null back from ServletContext.getContext(String)
, but if it get's a non null return then it goes on to do the actual test? Or do we need some other way to configure the tests to say that a container is expected to implement cross context dispatch? @olamy thoughts?
from servlet.
If all these tests also fail for the same reason they are valid TCK challenges and they should be excluded for the current TCK. @markt-asf Can you acknowledge this?
from servlet.
Should the tests be modified to succeed if they get a null back from ServletContext.getContext(String), but if it get's a non null return then it goes on to do the actual test?
If I remember the specification text correctly, that should be the expected behaviour. ServletContext.getContext(String)
can return null, and that's perfectly fine. But if it returns anything non-null, things should be as specified.
from servlet.
@arjantijms But for the current TCK this means those tests are currently invalid and should be excluded, now? That is the procedure, right?
from servlet.
@gregw I would prefer to adapt the test to keep running for container implementing cross context.
But in the case of Jetty (in the tests mentioned by @janbartel here), ServletContext.getContext(String)
doesn't return but AsyncContext.dispatch(...)
generate 404. So we cannot rely on the fact ServletContext.getContext(String)
is returning null
to keep running the test or not.
Maybe we should have some configuration saying container support cross context or not. This could be achieve by a System property.
Or maybe ServletContext.getContext(String)
returning null
should/could be this flag (so we have something to fix in Jetty 12 ;))
from servlet.
Or maybe
ServletContext.getContext(String)
returningnull
should/could be this flag (so we have something to fix in Jetty 12 ;))Perhaps calling
servletContent.getContext(ServletContext.getContextPath())
would be a good way to test if the container supports cross context dispatch or not?
yes I definitely like the idea.
if any objections in the next few days. I will propose PRs to TCK code.
Others?
from servlet.
So for the current 6.0 TCK this means those tests are to be excluded, right?
from servlet.
So for the current 6.0 TCK this means those tests are to be excluded, right?
For 6.x we have options:
- adapt current TCK 6.x code to check if
servletContent.getContext(...)
as a marker then skip the rest of crosscontext tests so container implementing this will have full set of testing - simply ignore them
No strong opinions on which option (1. might be a good amount of code changes)
For tckrefactor
maybe option 1.?
from servlet.
@markt-asf As you have already pushed other TCK tests similar to this to a TCK 6.1 release can we exclude these for 6.0 TCK as well?
from servlet.
I agree these tests can be excluded for 6.0 and we'll need to amend them for 6.1 so the exclusion can be removed.
from servlet.
implemented here #553
from servlet.
@olamy @markt-asf Can we close this out?
from servlet.
Related Issues (20)
- TCK: Need to add the signature tests HOT 1
- jakarta.servlet-api.jar MANIFEST.MF contains path to builder's current directory HOT 6
- Need to update schema for 6.1.0 release HOT 1
- Servlet 6.1.0 - Tomcat 11.0.0-M19-SNAPSHOT certification request HOT 1
- New home for HttpServletRequest injection requirements
- tests should not be in the jakarta package HOT 6
- ServletResponse.setCharacterEncoding(CharSet encoding) throws NullPointerException if encoding is null
- Blocker for starting EE 11 ballot: TCK user guide, and two folders with a tck-runtime.jar and a tck-utils.jar. I guess an assembly file is needed to create a zip file with those two artefacts, and then we have to add a basic user guide still. HOT 1
- Servlet 6.1.0 - Tomcat 11.0.0-M20 certification request HOT 5
- ServletSecTestServlet imports org.slf4j.Logger but test war doesn't include sl4j HOT 6
- Servlet 6.1.0 - Tomcat 11.0.0-M20 certification request HOT 3
- Finalize the release of Jakarta Servlet 6.1 HOT 8
- Circular dependency between AttributeConverter and JPA HOT 1
- TCK for Servlet 6.1 invalid error code in servlet.tck.api.jakarta_servlet_http.httpservletresponse HOT 2
- TCK for servlet 6.1 servlet/tck/spec/serverpush /ServerPushTests#serverPushCookieTest HOT 1
- Clarify behaviour for container managed HTTP headers HOT 1
- addLinkHeader HOT 1
- Version javax.servlet-api 4.0.1 still can be used HOT 1
- TCK coverage missing for attribute elements of cookie-config introduced since web-common_6_0.xsd
- Should the new Servlet 6.1 `jakarta.servlet.error.method` attribute be added to `Table 10-1 Request Attributes and their types`? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from servlet.