Skip to content

Commit 52c6b95

Browse files
committed
Fix and make tests more resilient
- Fix DeviceIntelligence test to use renamed interfaces (DeviceIntelligencePropertiesDevice instead of DeviceIntelligenceBreakdownPropertiesDevice) - Increase retry timeout for timeline file and evidence folder downloads to handle async file preparation
1 parent 9cb24e0 commit 52c6b95

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/com/onfido/integration/ReportSchemasTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public void schemaOfDeviceIntelligenceReportIsValid() throws Exception {
257257

258258
DeviceIntelligenceProperties properties = deviceIntelligenceReport.getProperties();
259259
Assertions.assertEquals(
260-
DeviceIntelligenceBreakdownPropertiesDevice.IpReputationEnum.NOT_ENOUGH_DATA,
260+
DeviceIntelligencePropertiesDevice.IpReputationEnum.NOT_ENOUGH_DATA,
261261
properties.getDevice().getIpReputation());
262262
Assertions.assertEquals("SM-G991B", properties.getDevice().getRawModel());
263263
}

src/test/java/com/onfido/integration/WorkflowRunTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void findTimelineFileTest() throws Exception {
118118
"findTimelineFile",
119119
new UUID[] {workflowRunId, timelineFileId},
120120
MAX_RETRIES,
121-
SLEEP_TIME);
121+
SLEEP_TIME * 2);
122122

123123
byte[] byteArray = download.getByteArray();
124124

@@ -140,7 +140,7 @@ public void downloadEvidenceFolderTest() throws Exception {
140140
FileTransfer evidenceFolderDownload =
141141
(FileTransfer)
142142
repeatRequestUntilHttpCodeChanges(
143-
"downloadEvidenceFolder", new UUID[] {workflowRunId}, MAX_RETRIES, SLEEP_TIME);
143+
"downloadEvidenceFolder", new UUID[] {workflowRunId}, MAX_RETRIES, SLEEP_TIME * 2);
144144

145145
byte[] byteArray = evidenceFolderDownload.getByteArray();
146146

0 commit comments

Comments
 (0)