I'm attempting to debug a subtle issue which I can only reproduce
occasionally; to do so, I've been adding some improved logging to a
module A, which is then used by our integration tests in module B
deploying on WildFly via Arquillian.
While polishing the log commits I've also made a change in this module
A which might resolve the issue.
I'm now running the integration tests B multiple times from command
line, via Maven from within the source directory of B. I did of course
"mvn clean install" the whole project first, which rebuilds module A
and all of its dependencies.
The really weird thing:
= rarely, the test fails, and there is no track of the logs I'm needing.
= sometimes, the test is successful and I have all logs as expected
(but they are useless).
= rarely, the test is successful and these logs are missing.
I've been running in circles since a couple of hours, but I *never*
could get the combination of
(have the logs) && (test fails)
The logger is set at DEBUG level for all of org.hibernate.search, and
when I say the logs are missing I am referring to the new couple of
log statements I just added exclusively: all other logs which
org.hibernate.search normally produces are logged all the time.
I'm starting to wonder if actually sometimes Maven runs my integration
tests using a previous SNAPSHOT build, which would be missing both the
logs and the fix, and in those cases it could either fail or not (as
it wasn't always reproduced).
Anyone else ever seen such an issue?
I now blasted all my Search SNAPSHOT jars from the local repository
and am running the tests in loop since 30 minutes and it's never
failed.. but not comfortable with this.
Also: I'm fighting what seems to be a timing issue, I wouldn't exclude
that the additional logs actually prevent me to trigger the failure -
but I have no explanation on why those logs sometimes are simply
missing from the logfiles: they are certainly triggered.
It seems that the ValidatorFactoryBean#createConstraintValidatorFactory
is getting called too late for some reason.
http://pastebin.com/WrdD91Hr shows the call stack for
which calls createConstraintValidatorFactory, which seems too late
(CdiValidatorFactoryService is shutting down).
To recreate the WildFly ORM 5 issue on WildFly (if you want to see it
yourself), steps are:
1. Build latest ORM master branch (./gradlew clean publishToMavenLocal).
2. Build https://github.com/scottmarlow/wildfly/tree/hibernate5_july2
branch (./build.sh clean install -DskipTests=true).
3. change into wildfly/testsuite/integration/basic folder and run "mvn
clean install -Dtest=*BeanValidationCdiIntegrationTestCase*
To run WildFly with the debugger, cd into
wildfly/dist/target/wildfly-10.0.0.Alpha5-SNAPSHOT/bin and edit the
standalone.conf file. Uncomment the "remote socket debugger" line #57
to look something like the following:
Then start WildFly, via ./standalone.sh and open port 8787 with your
Then run the test (step #3 above) and your debugger breakpoint should be