[Biojava-dev] Biojava genome test fails
Paolo Pavan
paolo.pavan at gmail.com
Wed Jul 15 09:44:37 UTC 2015
Yes Jose, you got it!
I modified assertBinaryEquals with assertEquals and now the test passes.
Good job. I can push a patch if you are of the same opinion.
2015-07-15 11:16 GMT+02:00 Jose Manuel Duarte <jose.duarte at psi.ch>:
> I am testing on Linux and all works fine. From your output it seems that
> you are in cygwin/windows, aren't you?
>
> I've had a look now into the test that fails
> (GeneFeatureHelperTest.testOutputFastaSequenceLengthGFF3) and I'd say that
> it must be an issue of new line character differences between windows/unix.
>
> The test tries to compare the BioJava-produced output file to a master
> file stored in the resources dir. The comparison is done with
> FileAssert.assertBinaryEquals() and that must be the problem: 1 file is
> written in windows and the other must be from unix, so they won't be the
> same binary-wise, I suppose because of the new lines (perhaps also the
> tabs?).
>
> I can't test it here properly without a Windows system, could you see if
> you can fix the test? I'd suggest simply replacing the binary comparison
> with a text-based comparison.
>
> Cheers
>
> Jose
>
>
>
> On 15.07.2015 10:56, Paolo Pavan wrote:
>
> Hi Jose,
> I tried it without success:
>
>
> CLEAN:
> $ /cygdrive/c/Program\ Files/NetBeans\ 8.0.2/java/maven/bin/mvn clean
> [INFO] Scanning for projects...
> [INFO] Inspecting build with total of 1 modules...
> [INFO] Installing Nexus Staging features:
> [INFO] ... total of 1 executions of maven-deploy-plugin replaced with
> nexus-staging-maven-plugin
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building biojava-genome 4.1.1-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ biojava-genome
> ---
> [INFO] Deleting
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\target
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1.038s
> [INFO] Finished at: Wed Jul 15 10:46:47 CEST 2015
> [INFO] Final Memory: 9M/232M
> [INFO]
> ------------------------------------------------------------------------
>
> TEST:
>
> cd
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome;
> "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_45" cmd /c "\"\"C:\\Program
> Files\\NetBeans 8.0.2\\java\\maven\\bin\\mvn.bat\"
> -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans
> 8.0.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8
> install\""
> Scanning for projects...
> Inspecting build with total of 1 modules...
> Installing Nexus Staging features:
> ... total of 1 executions of maven-deploy-plugin replaced with
> nexus-staging-maven-plugin
>
> ------------------------------------------------------------------------
> Building biojava-genome 4.1.1-SNAPSHOT
> ------------------------------------------------------------------------
>
> --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ biojava-genome ---
>
> --- maven-resources-plugin:2.5:resources (default-resources) @
> biojava-genome ---
> [debug] execute contextualize
> Using 'UTF-8' encoding to copy filtered resources.
> Copying 1 resource
>
> --- maven-compiler-plugin:3.3:compile (default-compile) @ biojava-genome
> ---
> Changes detected - recompiling the module!
> Compiling 28 source files to
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\target\classes
>
> --- maven-resources-plugin:2.5:testResources (default-testResources) @
> biojava-genome ---
> [debug] execute contextualize
> Using 'UTF-8' encoding to copy filtered resources.
> Copying 9 resources
>
> --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @
> biojava-genome ---
> Changes detected - recompiling the module!
> Compiling 3 source files to
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\target\test-classes
>
> --- maven-surefire-plugin:2.18.1:test (default-test) @ biojava-genome ---
> Surefire report directory:
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\target\surefire-reports
> file.encoding cannot be set as system property, use
> <argLine>-Dfile.encoding=...<argLine> instead
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.biojava.nbio.genome.AppTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
> - in org.biojava.nbio.genome.AppTest
> Running org.biojava.nbio.genome.FeatureListTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.429 sec
> - in org.biojava.nbio.genome.FeatureListTest
> Running org.biojava.nbio.genome.GeneFeatureHelperTest
> 10:47:18 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
> Reading:
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\src\test\resources\volvox.gff3
> 10:47:18 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
> Reading: src/test/resources/amphimedon.gff3
> 10:47:18 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
> Reading:
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\src\test\resources\volvox.gff3
> 10:47:19 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
> Reading:
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\src\test\resources\volvox.gff3
> 10:47:19 [main] INFO org.biojava.nbio.genome.GeneFeatureHelperTest - Note
> [protein kinase]
> 10:47:19 [main] INFO org.biojava.nbio.genome.GeneFeatureHelper - Gene
> EDEN found at ctgA 1050 9000 POSITIVE
> 10:47:19 [main] INFO org.biojava.nbio.genome.GeneFeatureHelper - Gene
> rna-Apple3 found at ctgA 18000 21200 POSITIVE
> Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.592 sec
> <<< FAILURE! - in org.biojava.nbio.genome.GeneFeatureHelperTest
> testOutputFastaSequenceLengthGFF3(org.biojava.nbio.genome.GeneFeatureHelperTest)
> Time elapsed: 0.198 sec <<< FAILURE!
> junit.framework.AssertionFailedError: actual file is shorter
> at junit.framework.Assert.fail(Assert.java:57)
> at junitx.framework.FileAssert.assertBinaryEquals(FileAssert.java:240)
> at
> org.biojava.nbio.genome.GeneFeatureHelperTest.testOutputFastaSequenceLengthGFF3(GeneFeatureHelperTest.java:105)
>
>
> Results :
>
> Failed tests:
> GeneFeatureHelperTest.testOutputFastaSequenceLengthGFF3:105 actual file
> is shorter
>
> Tests run: 8, Failures: 1, Errors: 0, Skipped: 0
>
> ------------------------------------------------------------------------
> BUILD FAILURE
> ------------------------------------------------------------------------
> Total time: 7.597s
> Finished at: Wed Jul 15 10:47:19 CEST 2015
> Final Memory: 22M/403M
> ------------------------------------------------------------------------
> Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test)
> on project biojava-genome: There are test failures.
>
> Please refer to
> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\target\surefire-reports
> for the individual test results.
> -> [Help 1]
>
> To see the full stack trace of the errors, re-run Maven with the -e switch.
> Re-run Maven using the -X switch to enable full debug logging.
>
> For more information about the errors and possible solutions, please read
> the following articles:
> [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
>
> 2015-07-14 19:55 GMT+02:00 Jose Manuel Duarte <jose.duarte at psi.ch>:
>
>> Maybe some files left over from a broken run? Try see if cleaning (mvn
>> clean) and then building again does the trick.
>>
>> Jose
>>
>>
>>
>> On 14.07.2015 18:11, Paolo Pavan wrote:
>>
>> Hi Jose,
>> Interesting! I'm also working on commit
>> 154edb7f9a5e9e54f25df3e27aeb169b4fab7799 and below is the result. At a
>> first glance it does not seem a network problem, it downloads
>> maven-metadata.xml.
>> What do you think?
>> Paolo
>>
>> -------------------------------------------------------
>> T E S T S
>> -------------------------------------------------------
>> Running org.biojava.nbio.genome.AppTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
>> - in org.biojava.nbio.genome.AppTest
>> Running org.biojava.nbio.genome.FeatureListTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.502 sec
>> - in org.biojava.nbio.genome.FeatureListTest
>> Running org.biojava.nbio.genome.GeneFeatureHelperTest
>> 18:04:40 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
>> Reading:
>> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\src\test\resources\volvox.gff3
>> 18:04:41 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
>> Reading: src/test/resources/amphimedon.gff3
>> 18:04:41 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
>> Reading:
>> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\src\test\resources\volvox.gff3
>> 18:04:41 [main] INFO org.biojava.nbio.genome.parsers.gff.GFF3Reader -
>> Reading:
>> C:\Users\pavanpa\Documents\Programming_workspace\biojava\biojava-genome\src\test\resources\volvox.gff3
>> 18:04:41 [main] INFO org.biojava.nbio.genome.GeneFeatureHelperTest -
>> Note [protein kinase]
>> 18:04:41 [main] INFO org.biojava.nbio.genome.GeneFeatureHelper - Gene
>> EDEN found at ctgA 1050 9000 POSITIVE
>> 18:04:41 [main] INFO org.biojava.nbio.genome.GeneFeatureHelper - Gene
>> rna-Apple3 found at ctgA 18000 21200 POSITIVE
>> Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.598 sec
>> <<< FAILURE! - in org.biojava.nbio.genome.GeneFeatureHelperTest
>> testOutputFastaSequenceLengthGFF3(org.biojava.nbio.genome.GeneFeatureHelperTest)
>> Time elapsed: 0.199 sec <<< FAILURE!
>> junit.framework.AssertionFailedError: actual file is shorter
>> at junit.framework.Assert.fail(Assert.java:57)
>> at junitx.framework.FileAssert.assertBinaryEquals(FileAssert.java:240)
>> at
>> org.biojava.nbio.genome.GeneFeatureHelperTest.testOutputFastaSequenceLengthGFF3(GeneFeatureHelperTest.java:105)
>>
>>
>> 2015-07-14 14:44 GMT+02:00 Jose Manuel Duarte <jose.duarte at psi.ch>:
>>
>>> It works for me (on commit 154edb7f9a5e9e).
>>>
>>> Could that be some kind of network problem?
>>>
>>> Jose
>>>
>>>
>>>
>>> On 14.07.2015 14:32, Paolo Pavan wrote:
>>>
>>> Hello,
>>> It seems that testOutputFastaSequenceLengthGFF3 fails in biojava-genome
>>> 4.1.1 snapshot.
>>> Is this happening to someone else?
>>>
>>> bye bye,
>>> Paolo
>>>
>>>
>>> _______________________________________________
>>> biojava-dev mailing listbiojava-dev at mailman.open-bio.orghttp://mailman.open-bio.org/mailman/listinfo/biojava-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> biojava-dev mailing list
>>> biojava-dev at mailman.open-bio.org
>>> http://mailman.open-bio.org/mailman/listinfo/biojava-dev
>>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biojava-dev/attachments/20150715/bb77e334/attachment-0001.html>
More information about the biojava-dev
mailing list