Upgrade to Servlet3, Unit test randomly failing on java8

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrade to Servlet3, Unit test randomly failing on java8

VANKEISBELCK Remi
Hi folks,

Merry xmas to all ! 

I'm trying to upgrade Stripes to Servlet3. 

It's required in order to fix those :
#35 : remove VFSs and let the container provide the classes to ResolverUtil
#37 : async action beans

And anyway I think it's about time to upgrade. Servlet3 has been out for a while now. 

For those interested, it's in the branch feature/async. Would be cool to have at least a few of you guys testing this on your apps. It's quite a big move, and I wouldn't want to break stuff...

For now, I'm using Java8 and having issues with this test :

net.sourceforge.stripes.validation.ValidationWithGenericsTest#testActionBeanWithTypeParameter

The overloads seem to cause random validation problems. I haven't digged yet. Maybe someone has already had a look ? 

Cheers

Rémi



------------------------------------------------------------------------------

_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to Servlet3, Unit test randomly failing on java8

VANKEISBELCK Remi
Hi Joaquin,

Kewl ! There is no doc, but the code is pretty much the same, only a few mods. 

The key thing is to ensure that there is no regression due to the upgrade to servlet3. The features (async and no-vfs) are in early stage, but again, the big issue is regression. There's only one way to make sure it's ok : we need to test it as much as we can. 

Simplest way to do so is to rebuild the code from branch feature/async, and change the dependency in your Stripes app(s). Then run all your integration tests, and report anything broken or suspicious !

I have done this exercise on some of my Stripes apps, and found almost nothing. But I don't cover everything of course so the more testers, the better. We also need to test on various app servers to make sure. I already found a DMF/async bug on tomcat7 I think.

Anyway, in order to build the Stripes jar :

// checkout/track remote branch feature/async
git checkout feature/async

// build and run tests (unit and web - with jetty9/selenium/firefox)
mvn clean install -Pwebtests 

// or with chrome (much faster, needs chromedriver.exe)
mvn clean install -Pwebtests -Dwebdriver.chrome.driver=/path/to/chromedriver -Dwebtests.browser=chrome

All should be green, and it should have installed the stripes jar into your local repo with version 1.7.0-async-SNAPSHOT.

You can then change the version of Stripes from your application and test everything with a servlet3 container.

Thanks for your help.

Cheers

Rémi



2015-12-28 16:24 GMT+01:00 Joaquin Valdez <[hidden email]>:
Hello!

I would love to help out.  Is there a doc on getting started with this?  Are there specific cases you would like tested?

Thanks
Joaquin 

On Dec 28, 2015, at 4:54 AM, VANKEISBELCK Remi <[hidden email]> wrote:

Hi folks,

Merry xmas to all ! 

I'm trying to upgrade Stripes to Servlet3. 

It's required in order to fix those :
#35 : remove VFSs and let the container provide the classes to ResolverUtil
#37 : async action beans

And anyway I think it's about time to upgrade. Servlet3 has been out for a while now. 

For those interested, it's in the branch feature/async. Would be cool to have at least a few of you guys testing this on your apps. It's quite a big move, and I wouldn't want to break stuff...

For now, I'm using Java8 and having issues with this test :

net.sourceforge.stripes.validation.ValidationWithGenericsTest#testActionBeanWithTypeParameter

The overloads seem to cause random validation problems. I haven't digged yet. Maybe someone has already had a look ? 

Cheers

Rémi


------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development


------------------------------------------------------------------------------

_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to Servlet3, Unit test randomly failing on java8

Rick Grashel
Remi,

I posted on the Git ticket, but why are you talking about removing VFS?  In order for classpath scanning to work in some containers, you have to have it.  I worked with someone in IRC just a week or so ago and we got his SpringBoot application working properly by dropping in myBatis' SpringBootExecutableJarVFS class.  No changes.  It just worked.  Containers cannot be trusted to expose all of their known dependencies and classpaths to applications for scanning purposes.  That is why the VFS interfaces exist.

-- Rick

On Mon, Dec 28, 2015 at 12:32 PM, VANKEISBELCK Remi <[hidden email]> wrote:
Hi Joaquin,

Kewl ! There is no doc, but the code is pretty much the same, only a few mods. 

The key thing is to ensure that there is no regression due to the upgrade to servlet3. The features (async and no-vfs) are in early stage, but again, the big issue is regression. There's only one way to make sure it's ok : we need to test it as much as we can. 

Simplest way to do so is to rebuild the code from branch feature/async, and change the dependency in your Stripes app(s). Then run all your integration tests, and report anything broken or suspicious !

I have done this exercise on some of my Stripes apps, and found almost nothing. But I don't cover everything of course so the more testers, the better. We also need to test on various app servers to make sure. I already found a DMF/async bug on tomcat7 I think.

Anyway, in order to build the Stripes jar :

// checkout/track remote branch feature/async
git checkout feature/async

// build and run tests (unit and web - with jetty9/selenium/firefox)
mvn clean install -Pwebtests 

// or with chrome (much faster, needs chromedriver.exe)
mvn clean install -Pwebtests -Dwebdriver.chrome.driver=/path/to/chromedriver -Dwebtests.browser=chrome

All should be green, and it should have installed the stripes jar into your local repo with version 1.7.0-async-SNAPSHOT.

You can then change the version of Stripes from your application and test everything with a servlet3 container.

Thanks for your help.

Cheers

Rémi



2015-12-28 16:24 GMT+01:00 Joaquin Valdez <[hidden email]>:
Hello!

I would love to help out.  Is there a doc on getting started with this?  Are there specific cases you would like tested?

Thanks
Joaquin 

On Dec 28, 2015, at 4:54 AM, VANKEISBELCK Remi <[hidden email]> wrote:

Hi folks,

Merry xmas to all ! 

I'm trying to upgrade Stripes to Servlet3. 

It's required in order to fix those :
#35 : remove VFSs and let the container provide the classes to ResolverUtil
#37 : async action beans

And anyway I think it's about time to upgrade. Servlet3 has been out for a while now. 

For those interested, it's in the branch feature/async. Would be cool to have at least a few of you guys testing this on your apps. It's quite a big move, and I wouldn't want to break stuff...

For now, I'm using Java8 and having issues with this test :

net.sourceforge.stripes.validation.ValidationWithGenericsTest#testActionBeanWithTypeParameter

The overloads seem to cause random validation problems. I haven't digged yet. Maybe someone has already had a look ? 

Cheers

Rémi


------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development


------------------------------------------------------------------------------

_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development



------------------------------------------------------------------------------

_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to Servlet3, Unit test randomly failing on java8

VANKEISBELCK Remi
Hi Rick, 

Yep I know the rationale behind VFSs, but it comes from "back in the days", when classpath scanning wasn't standard :P

My point is that now that it's provided by servlet containers (since years now), we could leverage this. 

I fully understand that we need to keep classpath scanning, be it only for unit tests. But having it working with servlet3 containers would allow us to avoid writing new VFSs all the time we find a problem. Let the container do it if it can.

The draft I have commited works just like this : if you have the container initializer declared then it'll use container-scanned classes. Otherwise it'll default to the current VFS mechanism. Ultimately, we'd need only one implementation of the VFS for the unit tests. For all servlet3 containers we should use the container IMHO.

Cheers

Rémi


2015-12-29 16:11 GMT+01:00 Rick Grashel <[hidden email]>:
Remi,

I posted on the Git ticket, but why are you talking about removing VFS?  In order for classpath scanning to work in some containers, you have to have it.  I worked with someone in IRC just a week or so ago and we got his SpringBoot application working properly by dropping in myBatis' SpringBootExecutableJarVFS class.  No changes.  It just worked.  Containers cannot be trusted to expose all of their known dependencies and classpaths to applications for scanning purposes.  That is why the VFS interfaces exist.

-- Rick

On Mon, Dec 28, 2015 at 12:32 PM, VANKEISBELCK Remi <[hidden email]> wrote:
Hi Joaquin,

Kewl ! There is no doc, but the code is pretty much the same, only a few mods. 

The key thing is to ensure that there is no regression due to the upgrade to servlet3. The features (async and no-vfs) are in early stage, but again, the big issue is regression. There's only one way to make sure it's ok : we need to test it as much as we can. 

Simplest way to do so is to rebuild the code from branch feature/async, and change the dependency in your Stripes app(s). Then run all your integration tests, and report anything broken or suspicious !

I have done this exercise on some of my Stripes apps, and found almost nothing. But I don't cover everything of course so the more testers, the better. We also need to test on various app servers to make sure. I already found a DMF/async bug on tomcat7 I think.

Anyway, in order to build the Stripes jar :

// checkout/track remote branch feature/async
git checkout feature/async

// build and run tests (unit and web - with jetty9/selenium/firefox)
mvn clean install -Pwebtests 

// or with chrome (much faster, needs chromedriver.exe)
mvn clean install -Pwebtests -Dwebdriver.chrome.driver=/path/to/chromedriver -Dwebtests.browser=chrome

All should be green, and it should have installed the stripes jar into your local repo with version 1.7.0-async-SNAPSHOT.

You can then change the version of Stripes from your application and test everything with a servlet3 container.

Thanks for your help.

Cheers

Rémi



2015-12-28 16:24 GMT+01:00 Joaquin Valdez <[hidden email]>:
Hello!

I would love to help out.  Is there a doc on getting started with this?  Are there specific cases you would like tested?

Thanks
Joaquin 

On Dec 28, 2015, at 4:54 AM, VANKEISBELCK Remi <[hidden email]> wrote:

Hi folks,

Merry xmas to all ! 

I'm trying to upgrade Stripes to Servlet3. 

It's required in order to fix those :
#35 : remove VFSs and let the container provide the classes to ResolverUtil
#37 : async action beans

And anyway I think it's about time to upgrade. Servlet3 has been out for a while now. 

For those interested, it's in the branch feature/async. Would be cool to have at least a few of you guys testing this on your apps. It's quite a big move, and I wouldn't want to break stuff...

For now, I'm using Java8 and having issues with this test :

net.sourceforge.stripes.validation.ValidationWithGenericsTest#testActionBeanWithTypeParameter

The overloads seem to cause random validation problems. I haven't digged yet. Maybe someone has already had a look ? 

Cheers

Rémi


------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development


------------------------------------------------------------------------------

_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development




------------------------------------------------------------------------------

_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development