[ 
https://issues.apache.org/jira/browse/NIFI-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385864#comment-15385864
 ] 

Joseph Witt commented on NIFI-2326:
-----------------------------------

The issue appears to be due to test execution order difference in the travis 
environment versus other environments we run exposing a bug introduced in the 
TemplateSerializerTest which reflectively altered the intialization state and 
classloader of the framework nar preventing proper initialization from 
occurring.  In finding that also updated NarClassLoaders to support a safer 
singleton pattern and safer initialization which can be recalled multiple times 
safely - though that wasn't the real problem.  The real problem was the 
reflective voodoo breaking the static class usage.  That reflective voodoo was 
to overcome the fact that the implementation of the initializer forced the use 
of the framework nar classloader.  That also has been moved out to the 
necessary caller and a comment made to this effect on the method call for 
future purposes.  Forcing it to be in the impl turned into promoting suboptimal 
testing practices.

> In testing extension classloader loaded twice in travis causes build failures
> -----------------------------------------------------------------------------
>
>                 Key: NIFI-2326
>                 URL: https://issues.apache.org/jira/browse/NIFI-2326
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Joseph Witt
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> Builds in travis have failed consistently for several days starting with 
> change to how templates are serialized.  The relationship is not clear but 
> the result is
> {quote}
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.008 sec <<< 
> FAILURE! - in 
> org.apache.nifi.controller.service.StandardControllerServiceProviderTest
> org.apache.nifi.controller.service.StandardControllerServiceProviderTest  
> Time elapsed: 0.008 sec  <<< ERROR!
> java.lang.IllegalStateException: Extensions class loaders have already been 
> loaded.
>       at org.apache.nifi.nar.NarClassLoaders.load(NarClassLoaders.java:67)
>       at 
> org.apache.nifi.controller.service.StandardControllerServiceProviderTest.setupSuite(StandardControllerServiceProviderTest.java:41)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to