vert-x / mod-lang-groovy

Vert.x 2.x is deprecated - use instead
https://github.com/vert-x3/vertx-lang-groovy
Other
16 stars 15 forks source link

Incorrect module version in test langs.properties file #73

Closed millross closed 10 years ago

millross commented 10 years ago

The module version in src/test/resources/langs.properties is 2.1RC3 when surely it should be 2.1.0-final (as per the version in the gradle properties file). I think many of the tests which deploy the module are actually not testing the current codebase - I noticed this when I was trying to create a pull request to align the API for HttpClientResponse and DefaultHttpClientResponse with the equivalant Java APIs, and my code changes weren't actually being seen by the tests.

I locally (on Ubuntu 13.10) tried to fix this but then a clean test of the code fails with lots of deployment errors complaining about compilation errors involving CP1252. This is odd as it's a Windows codepage and I'm running on Linux, so not sure what's going on. However, I thought I should let you know that currently the module being tested is the 2.1RC3 release, not 2.1.0-final. I'm sure that's not what you intend.

millross commented 10 years ago

Note, the only change I made to trigger a compilation/deployment failure on every test was to switch langs.properties to point to the current version of the module.

purplefox commented 10 years ago

@LostInBrittany Horatio, can you comment?

purplefox commented 10 years ago

I've updated both the Vert.x version used, and the version of the module used in tests, but the project doesn't event compile now :(

@LostInBrittany could you take a look?

thanks

LostInBrittany commented 10 years ago

It compiles and tests for me. I'm going to compile/test in other setup (os,JVM..) today and I will tell you here. On Jul 8, 2014 8:19 AM, "Tim Fox" notifications@github.com wrote:

I've updated both the Vert.x version used, and the version of the module used in tests, but the project doesn't event compile now :(

@LostInBrittany https://github.com/LostInBrittany could you take a look?

thanks

— Reply to this email directly or view it on GitHub https://github.com/vert-x/mod-lang-groovy/issues/73#issuecomment-48275992 .

millross commented 10 years ago

I tried updating the vert.x version and version of module used in tests locally, with vert.x 2.1 I saw failures on every test ("CP1232") and with 2.1.1 I saw compile failures. The thing I don't understand is that as far as I could see, mod-lang-groovy 2.1RC3 and 2.1.0-final are the same, so I can't see why just making the change to the test langs.properties alone (without changing the vert.x version) could have such a big effect.

LostInBrittany commented 10 years ago

As far as I remember, there is no change between mod-lang-groovy 2.1RC3 and 2.1.0-final, and I didn't see any problem when I tested before releasing

As I said, I'm going to test again today with several different setups, and I'll tell you what I find...

On Tue, Jul 8, 2014 at 8:47 AM, millross notifications@github.com wrote:

I tried updating the vert.x version and version of module used in tests locally, with vert.x 2.1 I saw failures on every test ("CP1232") and with 2.1.1 I saw compile failures. The thing I don't understand is that as far as I could see, mod-lang-groovy 2.1RC3 and 2.1.0-final are the same, so I can't see why just making the change to the test langs.properties alone (without changing the vert.x version) could have such a big effect.

— Reply to this email directly or view it on GitHub https://github.com/vert-x/mod-lang-groovy/issues/73#issuecomment-48277631 .

LostInBrittany commented 10 years ago

Tim,

When you updated to vert.x 2.1.1 it seems it brought some changes to default net implementations, mainly due to SSLContext setter methods. I think it was a change between 2.1.0 et 2.1.1. Working on it, to make it compile again, and then I'll try to reproduce the original problem

On Tue, Jul 8, 2014 at 9:22 AM, LostInBrittany lostinbrittany@gmail.com wrote:

As far as I remember, there is no change between mod-lang-groovy 2.1RC3 and 2.1.0-final, and I didn't see any problem when I tested before releasing

As I said, I'm going to test again today with several different setups, and I'll tell you what I find...

On Tue, Jul 8, 2014 at 8:47 AM, millross notifications@github.com wrote:

I tried updating the vert.x version and version of module used in tests locally, with vert.x 2.1 I saw failures on every test ("CP1232") and with 2.1.1 I saw compile failures. The thing I don't understand is that as far as I could see, mod-lang-groovy 2.1RC3 and 2.1.0-final are the same, so I can't see why just making the change to the test langs.properties alone (without changing the vert.x version) could have such a big effect.

— Reply to this email directly or view it on GitHub https://github.com/vert-x/mod-lang-groovy/issues/73#issuecomment-48277631 .

LostInBrittany commented 10 years ago

Ok, it compiles again.

I'm getting now all the tests in error, as +millross said, with:

org.vertx.java.tests.core.datagram.GroovyDatagramTest >
testSendAfterCloseFails STANDARD_ERROR
    Jul 08, 2014 11:20:41 AM
org.vertx.java.core.logging.impl.JULLogDelegate error
    SEVERE: Failed to deploy app
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:

file:/home/horacio/Copy/git/contrib/mod-lang-groovy/build/resources/test/core/datagram/testClient.groovy:
ISO1252

ISO1252 errors... Running on a linux too, I fail to understand why, searching...

On Tue, Jul 8, 2014 at 11:08 AM, LostInBrittany lostinbrittany@gmail.com wrote:

Tim,

When you updated to vert.x 2.1.1 it seems it brought some changes to default net implementations, mainly due to SSLContext setter methods. I think it was a change between 2.1.0 et 2.1.1. Working on it, to make it compile again, and then I'll try to reproduce the original problem

On Tue, Jul 8, 2014 at 9:22 AM, LostInBrittany lostinbrittany@gmail.com wrote:

As far as I remember, there is no change between mod-lang-groovy 2.1RC3 and 2.1.0-final, and I didn't see any problem when I tested before releasing

As I said, I'm going to test again today with several different setups, and I'll tell you what I find...

On Tue, Jul 8, 2014 at 8:47 AM, millross notifications@github.com wrote:

I tried updating the vert.x version and version of module used in tests locally, with vert.x 2.1 I saw failures on every test ("CP1232") and with 2.1.1 I saw compile failures. The thing I don't understand is that as far as I could see, mod-lang-groovy 2.1RC3 and 2.1.0-final are the same, so I can't see why just making the change to the test langs.properties alone (without changing the vert.x version) could have such a big effect.

— Reply to this email directly or view it on GitHub https://github.com/vert-x/mod-lang-groovy/issues/73#issuecomment-48277631 .

LostInBrittany commented 10 years ago

It seems the problem was a ISO1252 configuration in src/test/resources/ files.There the conf set groovy.source.encoding to ISO1252 in compilerConfiguration.groovy and compilerConfiguration.properties. Source files are in UTF-8, so I put groovy.source.encoding to UTF-8 (and changed src/test/groovy_scripts/platform/impl/testGroovyVerticleFactory.groovy to comply) and everything worked (besides a silly broken test I had added). I'm not sure of why it worked before, and why it didn't work anymore. Groovy 2.3.3 seems stricter than old goovy versions, when I migrated mod-lang-groovy to Groovy 2.3.3 last week, I had to make some changes to comply. So maybe it is. If you have another explanation, I'd love to hear it :)

Going to push the pull request now...

On Tue, Jul 8, 2014 at 11:41 AM, LostInBrittany lostinbrittany@gmail.com wrote:

O.K., I've found some problems in src/test/resources/lang.properties (it still sets groovy 2.1) and src/test/resources/compilerConfiguration (it sets ISO1252). I'm going to try to clean all that mess...

On Tue, Jul 8, 2014 at 11:24 AM, LostInBrittany lostinbrittany@gmail.com wrote:

Ok, it compiles again.

I'm getting now all the tests in error, as +millross said, with:

org.vertx.java.tests.core.datagram.GroovyDatagramTest >
testSendAfterCloseFails STANDARD_ERROR
    Jul 08, 2014 11:20:41 AM
org.vertx.java.core.logging.impl.JULLogDelegate error
    SEVERE: Failed to deploy app
    org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed:

file:/home/horacio/Copy/git/contrib/mod-lang-groovy/build/resources/test/core/datagram/testClient.groovy:
ISO1252

ISO1252 errors... Running on a linux too, I fail to understand why, searching...

On Tue, Jul 8, 2014 at 11:08 AM, LostInBrittany <lostinbrittany@gmail.com

wrote:

Tim,

When you updated to vert.x 2.1.1 it seems it brought some changes to default net implementations, mainly due to SSLContext setter methods. I think it was a change between 2.1.0 et 2.1.1. Working on it, to make it compile again, and then I'll try to reproduce the original problem

On Tue, Jul 8, 2014 at 9:22 AM, LostInBrittany <lostinbrittany@gmail.com

wrote:

As far as I remember, there is no change between mod-lang-groovy 2.1RC3 and 2.1.0-final, and I didn't see any problem when I tested before releasing

As I said, I'm going to test again today with several different setups, and I'll tell you what I find...

On Tue, Jul 8, 2014 at 8:47 AM, millross notifications@github.com wrote:

I tried updating the vert.x version and version of module used in tests locally, with vert.x 2.1 I saw failures on every test ("CP1232") and with 2.1.1 I saw compile failures. The thing I don't understand is that as far as I could see, mod-lang-groovy 2.1RC3 and 2.1.0-final are the same, so I can't see why just making the change to the test langs.properties alone (without changing the vert.x version) could have such a big effect.

— Reply to this email directly or view it on GitHub https://github.com/vert-x/mod-lang-groovy/issues/73#issuecomment-48277631 .

LostInBrittany commented 10 years ago

Pull request #74 submitted and merged, it should work now. If not, please tell me!

millross commented 10 years ago

Thanks - I was looking at compilerConfiguration briefly last night and saw the same, but I broke a test when I changed it locally so wanted to wait till I had more time to look at it. Just as you, I can't explain why it worked before and with a very small change stopped working (the only change I made to trigger the problem should, as far as I could see, run the same code as it was pulling in via the 2.1RC3 dependency), I can only surmise that maybe it's 2.3.3 strictness or something similar.

By the way, I only noticed the problem when preparing a small PR (my code was never getting picked up by the test I added for it, meaning the build failed, because 2.1RC3 was being pulled in as a binary, instead of my locally built code). When I've got a working baseline again, and a little more time, I'll reinstate my changes and submit the PR.

LostInBrittany commented 10 years ago

Thanks a lot, @millross !!!