Details
-
Type: Story
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.11.1.1
-
Component/s: Dev and Dep
-
Labels:None
Description
More of an informational than anything else. Whilst testing JAL-3628 I noticed that many tests were being skipped due to a buried NullPointerException occuring in odd places:
$ gradle clean test
...
> Task :test
jalview.ws.sifts.SiftsClientTest.setUpSiftsClient FAILED
java.lang.NullPointerException at SiftsClientTest.java:201
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
1331 tests completed, 15 failed, 1316 skipped
> Task :test FAILED
All these NPEs are where jalview.bin.Cache.log is being used. In this case, I discovered the root cause was a patch introduced viaJAL-3628, where a static method (jalview.io.BackupFiles.moveFileToFile(..)) was using jalview.bin.Cache.log without first calling Cache.initLogger().
This didn't cause any problem until one of the '.sifts_downloads' files became too old, trigging a call to update the SIFTS file cache.. which due to another patch introduced inJAL-3628 called BackupFiles.moveFileToFile without initting the logs.
$ gradle clean test
...
> Task :test
jalview.ws.sifts.SiftsClientTest.setUpSiftsClient FAILED
java.lang.NullPointerException at SiftsClientTest.java:201
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
jalview.analysis.FinderTest.tearDownAfterTest FAILED
java.lang.NullPointerException at FinderTest.java:85
1331 tests completed, 15 failed, 1316 skipped
> Task :test FAILED
All these NPEs are where jalview.bin.Cache.log is being used. In this case, I discovered the root cause was a patch introduced via
This didn't cause any problem until one of the '.sifts_downloads' files became too old, trigging a call to update the SIFTS file cache.. which due to another patch introduced in