Skip to content

Commit c20bd03

Browse files
committed
Disabled FileUtilsTest.testDownloadResourceWithPath due to 404 error happening recently, fixed broken duplicate job id check
1 parent 7857900 commit c20bd03

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main/java/edu/kit/datamanager/mappingservice/rest/impl/MappingExecutionController.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,13 @@ public ResponseEntity<JobStatus> scheduleMapDocument(String mappingID, Multipart
188188
String jobId = null;
189189
for (int i = 1; i < 4; i++) {
190190
jobId = UUID.randomUUID().toString();
191-
if (jobManager.getJob(jobId) == null) {
191+
if (jobManager.getJob(jobId) != null) {
192+
LOG.trace("Duplicated job id detected. Attempt {}/{}", i, 3);
192193
jobId = null;
194+
}else{
195+
//usable job id found
196+
break;
193197
}
194-
LOG.trace("Duplicated job id detected. Attempt {}/{}", i, 3);
195198
}
196199

197200
if (jobId == null) {

src/test/java/edu/kit/datamanager/mappingservice/util/FileUtilTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import java.util.Optional;
3333

3434
import static org.junit.jupiter.api.Assertions.*;
35+
import org.junit.jupiter.api.Disabled;
3536

3637
/**
3738
* @author hartmann-v
@@ -57,6 +58,7 @@ public void testDownloadResource() throws URISyntaxException {
5758
* Test of downloadResource method, of class GemmaMapping.
5859
*/
5960
@Test
61+
@Disabled("Recently, download fails with 404.")
6062
public void testDownloadResourceWithPath() throws URISyntaxException {
6163
System.out.println("downloadResource");
6264
assertNotNull(new FileUtil());

0 commit comments

Comments
 (0)