quattor / maven-tools

Maven-based Build Tools
www.quattor.org
Apache License 2.0
3 stars 12 forks source link

1.49 breaks unit testing in configuration-modules-grid #92

Closed jouvin closed 8 years ago

jouvin commented 8 years ago

I have not found why yet but build tools 1.49 breaks any unit test that compiles a profile in configuration-modules-grid (ncm-dpmlfc and ncm-xrootd). The error is the same in all case, below is an example:

# DEBUG: Converted profile dpm-config in cache name dpm_2dconfig 
# VERBOSE template-library-core path found /exp/si/jouvin/GitRepositories/Quattor/template-library-core
# DEBUG: Pan compiler called from directory /exp/si/jouvin/GitRepositories/Quattor/configuration-modules-grid/ncm-dpmlfc/src/test/resources (proc panc --formats json --output-dir /exp/si/jouvin/GitRepositories/Quattor/configuration-modules-grid/ncm-dpmlfc/target/test/profiles --include-path .:/exp/si/jouvin/GitRepositories/Quattor/configuration-modules-grid/ncm-dpmlfc/target/pan:/exp/si/jouvin/GitRepositories/Quattor/template-library-core dpm-config.pan) 
# DEBUG: Converted profile dpm-config in cache name dpm_2dconfig 
Uncaught exception!!! Calling stack is:
  LC::Exception::throw_error called at /usr/lib/perl/LC/Fatal.pm line 204
  LC::Fatal::stat called at /usr/lib/perl/LC/Check.pm line 883
  LC::Check::file called at /exp/si/jouvin/GitRepositories/Quattor/CAF/target/lib/perl//CAF/FileWriter.pm line 209
  CAF::FileWriter::close called at /exp/si/jouvin/GitRepositories/Quattor/CAF/target/lib/perl//CAF/FileWriter.pm line 350
  CAF::FileWriter::DESTROY called at src/test/perl/configure.t line 0
  (eval) called at src/test/perl/configure.t line 0
*** stat(/exp/si/jouvin/GitRepositories/Quattor/configuration-modules-grid/ncm-dpmlfc/target/test/cache/dpm_2dconfig/profile.2/profile.xml): No such file or directory
src/test/perl/configure.t ... 

Is it something link to the additional mocking introduced in 1.49? Reverting to 1.48, the tests are ok.

stdweird commented 8 years ago

related to https://github.com/quattor/configuration-modules-core/pull/757 is this with current master? it looked like an issue with CCM, but i couldn't reproduce it anymore after bumping the buildtools. i'll make a patch for CCM so you can try it if it helps/is related at all.

jouvin commented 8 years ago

I was using the CAF master but not the CCM master, I'll check.

stdweird commented 8 years ago

there's nothing in CCM master that will fix it though :smile:

jouvin commented 8 years ago

This is what I was about to report after trying it!

stdweird commented 8 years ago

i can't make a clean PR unittests are acting up, but can you try to add

$current{url}->close();
$current{profile}->close();

after https://github.com/quattor/CCM/blob/master/src/main/perl/Fetch.pm#L212

on your local install?

i'll try to work on it monday or tuesday

jouvin commented 8 years ago

I confirm that it fixes the problem.