edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject Re: maven: animal sniffer use not working?
Date Mon, 23 Oct 2017 21:41:50 GMT
Hi Dale,

I’m just finishing some fixes that will repair things.
The problem is that the animal sniffer checks the compile stuff, not the test …
And not runtime stuff.

Chris

Am 23.10.17, 23:40 schrieb "Dale LaBossiere" <dml.apache@gmail.com>:

    Hi Chris,
    
    When I first enabled the J7 tests for Connectors: File (having thought I got all of the
“since 1.8” usages in the tests), the animal sniffer didn’t detect a lurking use of
“since 1.8" Files.newBufferedReader() in the test code.  Is there some misconfiguration
somewhere?
    
    e.g., the following is from Jenkins build #105.  You can see that the build/retro lambda
for the connector code and test code succeeds and animal-sniffer is run, but it doesn’t
detect the problem in the test code and the test then fails.
    
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Apache Edgent (Java 7): Connectors: File 1.2.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ edgent-connectors-file ---
    [INFO] Deleting /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target
    [INFO] 
    [INFO] --- maven-toolchains-plugin:1.1:toolchain (default) @ edgent-connectors-file ---
    [INFO] Required toolchain: jdk [ vendor='oracle' version='1.7' ]
    [INFO] Found matching toolchain for type jdk: JDK[/home/jenkins/tools/java/latest1.7/]
    [INFO] 
    [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-property) @ edgent-connectors-file
---
    [INFO] 
    [INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-test) @ edgent-connectors-file
---
    [INFO] surefireArgLine set to -javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/jacoco.exec
    [INFO] 
    [INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ edgent-connectors-file
---
    [INFO] 
    [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ edgent-connectors-file
---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/src/main/resources
    [INFO] Copying 4 resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ edgent-connectors-file
---
    [INFO] Toolchain in maven-compiler-plugin: JDK[/home/jenkins/tools/java/latest1.7/]
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- maven-dependency-plugin:3.0.1:unpack (copy) @ edgent-connectors-file ---
    [INFO] Configured Artifact: org.apache.edgent:edgent-connectors-file:1.2.0-SNAPSHOT:jar
    [INFO] Configured Artifact: org.apache.edgent:edgent-connectors-file:tests:1.2.0-SNAPSHOT:jar
    [INFO] Unpacking /home/jenkins/jenkins-slave/workspace/edgent-dev/connectors/file/target/edgent-connectors-file-1.2.0-SNAPSHOT.jar
to /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/classes
with includes "" and excludes "META-INF/**"
    [INFO] Unpacking /home/jenkins/jenkins-slave/workspace/edgent-dev/connectors/file/target/edgent-connectors-file-1.2.0-SNAPSHOT-tests.jar
to /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/test-classes
with includes "" and excludes "META-INF/**"
    [INFO] 
    [INFO] --- retrolambda-maven-plugin:2.5.1:process-main (default) @ edgent-connectors-file
---
    [INFO] Retrieving Retrolambda 2.5.1
    [INFO] Configured Artifact: net.orfjackal.retrolambda:retrolambda:2.5.1:jar
    [INFO] Copying retrolambda-2.5.1.jar to /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/retrolambda/retrolambda.jar
    [INFO] Processing classes with Retrolambda
    [INFO] Toolchain in retrolambda-maven-plugin: JDK[/home/jenkins/tools/java/latest1.7/]
    [WARNING] Toolchains are ignored, 'java8home' parameter is set to /home/jenkins/tools/java/latest1.8
    [INFO] Executing tasks
    
    main:
         [exec] Retrolambda 2.5.1
         [exec] 00:00  INFO: Bytecode version: 51 (Java 7)
         [exec] 00:00  INFO: Default methods:  false
         [exec] 00:00  INFO: Input directory:  /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/classes
         [exec] 00:00  INFO: Output directory: /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/classes
    . . .
         [exec] 00:00  INFO: Included files:   all
         [exec] 00:00  INFO: Agent enabled:    true
         [exec] 00:00  INFO: Saving lambda class: org/apache/edgent/connectors/file/FileStreams$$Lambda$1
    . . .
    [INFO] Executed tasks
    [INFO] 
    [INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ edgent-connectors-file
---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/src/test/resources
    [INFO] Copying 4 resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ edgent-connectors-file
---
    [INFO] Toolchain in maven-compiler-plugin: JDK[/home/jenkins/tools/java/latest1.7/]
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- retrolambda-maven-plugin:2.5.1:process-test (default) @ edgent-connectors-file
---
    [INFO] Retrieving Retrolambda 2.5.1
    [INFO] Configured Artifact: net.orfjackal.retrolambda:retrolambda:2.5.1:jar
    [INFO] Copying retrolambda-2.5.1.jar to /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/retrolambda/retrolambda.jar
    [INFO] Processing classes with Retrolambda
    [INFO] Toolchain in retrolambda-maven-plugin: JDK[/home/jenkins/tools/java/latest1.7/]
    [WARNING] Toolchains are ignored, 'java8home' parameter is set to /home/jenkins/tools/java/latest1.8
    [INFO] Executing tasks
    
    main:
         [exec] Retrolambda 2.5.1
         [exec] 00:00  INFO: Bytecode version: 51 (Java 7)
         [exec] 00:00  INFO: Default methods:  false
         [exec] 00:00  INFO: Input directory:  /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/test-classes
         [exec] 00:00  INFO: Output directory: /home/jenkins/jenkins-slave/workspace/edgent-dev/platforms/java7/connectors/file/target/test-classes
    . . .
         [exec] 00:00  INFO: Included files:   all
         [exec] 00:00  INFO: Agent enabled:    true
         [exec] 00:00  INFO: Saving lambda class: org/apache/edgent/test/connectors/file/FileStreamsTextFileWriterTest$$Lambda$1
    . . .
    [INFO] Executed tasks
    [INFO] 
    [INFO] --- animal-sniffer-maven-plugin:1.15:check (check-jdk-signatures) @ edgent-connectors-file
---
    [INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
    [INFO] 
    [INFO] --- maven-surefire-plugin:2.20:test (default-test) @ edgent-connectors-file ---
    [INFO] Toolchain in maven-surefire-plugin: JDK[/home/jenkins/tools/java/latest1.7/]
    [INFO] 
    [INFO] -------------------------------------------------------
    [INFO]  T E S T S
    [INFO] -------------------------------------------------------
    [INFO] Running org.apache.edgent.test.connectors.file.FileStreamsGlobalTest
    . . .
    ########## testAllTimeBased
    actFiles: [/tmp/test15917667886213607554txt_20171023_162848, /tmp/test15917667886213607554txt_20171023_162848_1,
/tmp/test15917667886213607554txt_20171023_162848_2, /tmp/test15917667886213607554txt_20171023_162848_3]
    expResults: [[1-一二三四五六七八九], [2-一二三四五六七八九], [3-一二三四五六七八九],
[4-一二三四五六七八九]]
    checking file /tmp/test15917667886213607554txt_20171023_162848
    [ERROR] Tests run: 22, Failures: 0, Errors: 15, Skipped: 0, Time elapsed: 67.129 s <<<
FAILURE! - in org.apache.edgent.test.connectors.file.FileStreamsTextFileWriterGlobalTest
    [ERROR] testManyFilesSlow(org.apache.edgent.test.connectors.file.FileStreamsTextFileWriterGlobalTest)
 Time elapsed: 10.337 s  <<< ERROR!
    java.lang.NoSuchMethodError: java.nio.file.Files.newBufferedReader(Ljava/nio/file/Path;)Ljava/io/BufferedReader;
    
    [ERROR] testCycleSizeBased(org.apache.edgent.test.connectors.file.FileStreamsTextFileWriterGlobalTest)
 Time elapsed: 2.295 s  <<< ERROR!
    java.lang.NoSuchMethodError: java.nio.file.Files.newBufferedReader(Ljava/nio/file/Path;)Ljava/io/BufferedReader;
    
    ...
    

Mime
View raw message