Coder Social home page Coder Social logo

Comments (16)

gregw avatar gregw commented on August 12, 2024 2

Or maybe ServletContext.getContext(String) returning null 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.

mnriem avatar mnriem commented on August 12, 2024

@markt-asf What is the status of this issue?

from servlet.

markt-asf avatar markt-asf commented on August 12, 2024

The test can be excluded for now and we'll fix it for 6.1.

from servlet.

janbartel avatar janbartel commented on August 12, 2024

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.

gregw avatar gregw commented on August 12, 2024

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.

mnriem avatar mnriem commented on August 12, 2024

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.

arjantijms avatar arjantijms commented on August 12, 2024

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.

mnriem avatar mnriem commented on August 12, 2024

@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.

olamy avatar olamy commented on August 12, 2024

@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.

olamy avatar olamy commented on August 12, 2024

Or maybe ServletContext.getContext(String) returning null 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.

mnriem avatar mnriem commented on August 12, 2024

So for the current 6.0 TCK this means those tests are to be excluded, right?

from servlet.

olamy avatar olamy commented on August 12, 2024

So for the current 6.0 TCK this means those tests are to be excluded, right?

For 6.x we have options:

  1. 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
  2. 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.

mnriem avatar mnriem commented on August 12, 2024

@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.

markt-asf avatar markt-asf commented on August 12, 2024

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.

olamy avatar olamy commented on August 12, 2024

implemented here #553

from servlet.

mnriem avatar mnriem commented on August 12, 2024

@olamy @markt-asf Can we close this out?

from servlet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.