mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 14:56:41 +00:00
increased issue date tolerance to 10s as we saw 5s already
This commit is contained in:
1 parent
b7e5f4d006
commit
a320ff0534
2 files changed
+8
-3
No files matched your search
+2
-2
@@ -56,7 +56,7 @@ public class TestORCPerformanceCurve {
|
||||
private static final String RESOURCES = "resources/orc/";
|
||||
|
||||
@Rule
|
||||
public FailIfNoValidOrcCertificateRule customIgnoreRule = new FailIfNoValidOrcCertificateRule();
|
||||
public FailIfNoValidOrcCertificateRule customFailRule = new FailIfNoValidOrcCertificateRule();
|
||||
|
||||
@Rule
|
||||
public ErrorCollector collector = new ErrorCollector();
|
||||
@@ -98,7 +98,7 @@ public class TestORCPerformanceCurve {
|
||||
File fileWithSpecificBins = new File(RESOURCES + "newFormatCertificate.json");
|
||||
importerWithSpecificBins = new ORCCertificatesJsonImporter().read(new FileInputStream(fileWithSpecificBins));
|
||||
// Online File:
|
||||
importerOnline = new ORCCertificatesJsonImporter().read(new URL("https://data.orc.org/public/WPub.dll?action=DownRMS&CountryId=GER&ext=json").openStream());
|
||||
importerOnline = new ORCCertificatesJsonImporter().read(new URL("https://data.orc.org/public/WPub.dll?action=DownBoatRMS&CountryId=GER&ext=json").openStream());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+6
-1
@@ -148,7 +148,12 @@ public class TestORCPublicCertificateDatabase {
|
||||
final CertificateHandle handle = db.getCertificateHandle(referenceNumber);
|
||||
final ORCCertificate result = db.getCertificate(referenceNumber);
|
||||
assertEquals(handle.getGPH(), result.getGPH().asSeconds(), 0.00001);
|
||||
assertEquals(handle.getIssueDate().asMillis(), result.getIssueDate().asMillis(), 1000.0);
|
||||
// Use some tolerance as we found differences as much as 5s between the dxtDate in the handle coming from the XML search result
|
||||
// and the IssueDate field in the JSON. Both suggest to report millisecond accuracy, but dxtDate always seems to have the
|
||||
// milliseconds as "000" explaining many sub-second differences. But in some cases differences were significantly bigger.
|
||||
assertEquals("Issue dates of certificate with reference number "+referenceNumber+
|
||||
" varies between current year result handle ("+handle.getIssueDate()+") and certificate ("+
|
||||
result.getIssueDate()+").", handle.getIssueDate().asMillis(), result.getIssueDate().asMillis(), 10000.0);
|
||||
assertEquals(handle.getSailNumber(), result.getSailNumber());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user