Align TestNG version with the one used by the TCK

Description

The TCK is using 6.11, whereas HV still is on 6.8.

Environment

None

Activity

Show:
Guillaume Smet
July 5, 2017, 9:17 AM

Moving to 6.1 as I don't see us fixing that in the 6.0 release cycle.

Gunnar Morling
June 13, 2017, 2:11 PM

I had a quick look and I think ultimately this exposes an incorrect implementation in ValidationInvocationHandler. Instead of passing the wrapped object into the validation engine, the proxy – as passed to the invoke() method – should be passed. So I tried that, but this causes several tests to fail, as the proxy is no sub-class if the proxied object, i.e. is-a assertions will fail. So I quickly hacked together a PoC which uses sub-class proxies generated via ByteBuddy instead of JDK dynamic proxies which can be found here: https://github.com/hibernate/hibernate-validator/compare/master...gunnarmorling:HV-1361?expand=1

With some adjustments in tests, this makes almost all tests pass. The only remaining failures are caused by the fact that a re-declared default group sequence isn't handled correctly. I thought I could simply copy that annotation to the proxy class (calling ByteBuddy's annotatedWith() method), but this results in an exception telling me that the type itself isn't part of the redeclared default group sequence. I don't think this can be achieved using ByteBuddy, as the proxy class naturally doesn't exist yet when calling annotatedWith(). On the other hand I'd also expect the redeclared default group sequence on the proxied type itself to apply, but it isn't. This is worth investigating, but I need to focus on some other things in the spec for the time being.

Guillaume Smet
June 13, 2017, 10:43 AM

For history: in TestNG 6.9, they changed the way equality is tested. actual has to be equal to expected AND expected has to be equal to actual.

This is not true when one of the elements is proxied.

I will introduce new methods with the old behavior. It only concerns one test so it should be OK.

Assignee

Gunnar Morling

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Fix versions

Priority

Major