From b8a6cf0e9601d25c013f05e4d56f7ade1d569a87 Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Thu, 27 Jul 2023 15:29:39 -0400 Subject: [PATCH 01/12] create an endpoint displaying version info --- .../web/service/controller/ValidationController.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index e2ef0f7814..ac55d05c43 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -121,6 +121,15 @@ public ResponseEntity runValidator( } } + @GetMapping("/version") + public String currentVersion() { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append("Current Version: 4.1.0"); + return stringBuilder.toString(); + //https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/create-job + // "This file determines the latest version of the validator app. Users of the app will be advised to upgrade if their local version does not match"; + } + @PostMapping("/error") public ResponseEntity Error() { try { From 60fe06a4becbbeef6a01e1ff74f496d98be2c052 Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Mon, 31 Jul 2023 09:52:25 -0400 Subject: [PATCH 02/12] added current version information --- .../service/controller/ValidationController.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index ac55d05c43..74ecff71c6 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -22,7 +22,10 @@ import java.io.*; import java.net.URL; import java.nio.file.Path; +import java.time.Duration; import java.util.*; +import org.mobilitydata.gtfsvalidator.util.VersionInfo; +import org.mobilitydata.gtfsvalidator.util.VersionResolver; import org.mobilitydata.gtfsvalidator.web.service.util.JobMetadata; import org.mobilitydata.gtfsvalidator.web.service.util.StorageHelper; import org.mobilitydata.gtfsvalidator.web.service.util.ValidationHandler; @@ -42,6 +45,8 @@ public class ValidationController { @Autowired private StorageHelper storageHelper; @Autowired private ValidationHandler validationHandler; + @Autowired private VersionResolver checker; + private static final Duration TIMEOUT = Duration.ofSeconds(5); /** * Creates a new job id and returns it to the client. If a url is provided, the file is downloaded @@ -123,11 +128,15 @@ public ResponseEntity runValidator( @GetMapping("/version") public String currentVersion() { + // https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/version StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append("Current Version: 4.1.0"); + stringBuilder.append( + "This file determines the latest version of the validator app. Users of the app will be advised to upgrade if their local version does not match\n"); + stringBuilder.append("Current Version: "); + // VersionResolver checker = new VersionResolver(); + VersionInfo versionInfo = checker.getVersionInfoWithTimeout(TIMEOUT); + stringBuilder.append(versionInfo.currentVersion()); return stringBuilder.toString(); - //https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/create-job - // "This file determines the latest version of the validator app. Users of the app will be advised to upgrade if their local version does not match"; } @PostMapping("/error") From 5956b2080d6e0bdfb816c0813f713cc5dc7f82fe Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Mon, 31 Jul 2023 14:26:51 -0400 Subject: [PATCH 03/12] setup Bean for VersionResolver --- .../org/mobilitydata/gtfsvalidator/web/service/Main.java | 7 ++++++- .../web/service/controller/ValidationController.java | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java index 1654a022bb..be66c6ca0f 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java @@ -30,6 +30,11 @@ public static void main(String[] args) { @Bean public ValidationRunner validationRunner() { - return new ValidationRunner(new VersionResolver()); + return new ValidationRunner(versionResolver()); + } + + @Bean + public VersionResolver versionResolver() { + return new VersionResolver(); } } diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 74ecff71c6..9e6810277f 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -45,6 +45,7 @@ public class ValidationController { @Autowired private StorageHelper storageHelper; @Autowired private ValidationHandler validationHandler; + @Autowired private VersionResolver checker; private static final Duration TIMEOUT = Duration.ofSeconds(5); @@ -130,10 +131,10 @@ public ResponseEntity runValidator( public String currentVersion() { // https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/version StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append( - "This file determines the latest version of the validator app. Users of the app will be advised to upgrade if their local version does not match\n"); + //stringBuilder.append( + // "This file determines the latest version of the validator app. Users of the app will be advised to upgrade if their local version does not match\\n\"); stringBuilder.append("Current Version: "); - // VersionResolver checker = new VersionResolver(); + VersionResolver checker = new VersionResolver(); VersionInfo versionInfo = checker.getVersionInfoWithTimeout(TIMEOUT); stringBuilder.append(versionInfo.currentVersion()); return stringBuilder.toString(); From 493ffd9d22714f9536a966988ca85f6ab27238cf Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Thu, 3 Aug 2023 13:17:19 -0400 Subject: [PATCH 04/12] return a json instead of a string --- .../web/service/controller/ValidationController.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 9e6810277f..bd74e532ec 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -128,16 +128,20 @@ public ResponseEntity runValidator( } @GetMapping("/version") - public String currentVersion() { + public ResponseEntity currentVersion() { // https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/version StringBuilder stringBuilder = new StringBuilder(); - //stringBuilder.append( - // "This file determines the latest version of the validator app. Users of the app will be advised to upgrade if their local version does not match\\n\"); stringBuilder.append("Current Version: "); VersionResolver checker = new VersionResolver(); VersionInfo versionInfo = checker.getVersionInfoWithTimeout(TIMEOUT); stringBuilder.append(versionInfo.currentVersion()); - return stringBuilder.toString(); + try { + Map body = new HashMap<>(); + body.put("message", stringBuilder.toString()); + return new ResponseEntity<>(body, HttpStatus.OK); + } catch (Exception e) { + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } } @PostMapping("/error") From a8bfba75a281a72dfb77d94458f5bd5a3b094854 Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Tue, 8 Aug 2023 14:29:45 -0400 Subject: [PATCH 05/12] return the versionInfo only --- .../web/service/controller/ValidationController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index bd74e532ec..31827ffb6e 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -131,8 +131,7 @@ public ResponseEntity runValidator( public ResponseEntity currentVersion() { // https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/version StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append("Current Version: "); - VersionResolver checker = new VersionResolver(); + VersionResolver checker = new VersionResolver(); VersionInfo versionInfo = checker.getVersionInfoWithTimeout(TIMEOUT); stringBuilder.append(versionInfo.currentVersion()); try { From acf975c30a8e4eb93f0292134b2363c742a332bf Mon Sep 17 00:00:00 2001 From: Jingsi Lu <5789435+qcdyx@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:35:23 -0400 Subject: [PATCH 06/12] Update web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java Co-authored-by: David Gamez <1192523+davidgamez@users.noreply.github.com> --- .../web/service/controller/ValidationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 31827ffb6e..40387f381e 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -128,7 +128,7 @@ public ResponseEntity runValidator( } @GetMapping("/version") - public ResponseEntity currentVersion() { + public ResponseEntity currentVersion() { // https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/version StringBuilder stringBuilder = new StringBuilder(); VersionResolver checker = new VersionResolver(); From 9e075b42a0c4f5b8e61f9d58e7cc00896d39a27d Mon Sep 17 00:00:00 2001 From: Jingsi Lu <5789435+qcdyx@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:35:54 -0400 Subject: [PATCH 07/12] Update web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java Co-authored-by: David Gamez <1192523+davidgamez@users.noreply.github.com> --- .../web/service/controller/ValidationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 40387f381e..5239d2949b 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -46,7 +46,7 @@ public class ValidationController { @Autowired private StorageHelper storageHelper; @Autowired private ValidationHandler validationHandler; - @Autowired private VersionResolver checker; + @Autowired private VersionResolver versionResolver; private static final Duration TIMEOUT = Duration.ofSeconds(5); /** From d88630a5f4b000a4f4daccd9bc5871e8647c341b Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Wed, 9 Aug 2023 09:08:06 -0400 Subject: [PATCH 08/12] use a custom Response VersionResponse --- .../gtfsvalidator/util/VersionResolver.java | 2 +- .../controller/ValidationController.java | 19 ++++++++----------- .../service/controller/VersionResponse.java | 10 ++++++++++ 3 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java diff --git a/main/src/main/java/org/mobilitydata/gtfsvalidator/util/VersionResolver.java b/main/src/main/java/org/mobilitydata/gtfsvalidator/util/VersionResolver.java index e4f28135f9..ce71db4bbb 100644 --- a/main/src/main/java/org/mobilitydata/gtfsvalidator/util/VersionResolver.java +++ b/main/src/main/java/org/mobilitydata/gtfsvalidator/util/VersionResolver.java @@ -111,7 +111,7 @@ public synchronized void resolve() { * * @throws IOException */ - private Optional resolveCurrentVersion() throws IOException { + public Optional resolveCurrentVersion() throws IOException { ScanResult scan = new ClassGraph().scan(); Optional gtfsValidatorCoreVersion = Optional.empty(); for (Resource resource : scan.getResourcesWithPath("META-INF/MANIFEST.MF")) { diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 5239d2949b..213b3a5d0f 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -24,6 +24,7 @@ import java.nio.file.Path; import java.time.Duration; import java.util.*; + import org.mobilitydata.gtfsvalidator.util.VersionInfo; import org.mobilitydata.gtfsvalidator.util.VersionResolver; import org.mobilitydata.gtfsvalidator.web.service.util.JobMetadata; @@ -128,19 +129,15 @@ public ResponseEntity runValidator( } @GetMapping("/version") - public ResponseEntity currentVersion() { - // https://gtfs-validator-web-mbzoxaljzq-ue.a.run.app/version - StringBuilder stringBuilder = new StringBuilder(); - VersionResolver checker = new VersionResolver(); - VersionInfo versionInfo = checker.getVersionInfoWithTimeout(TIMEOUT); - stringBuilder.append(versionInfo.currentVersion()); + public VersionResponse currentVersion() { + VersionResponse versionResponse; try { - Map body = new HashMap<>(); - body.put("message", stringBuilder.toString()); - return new ResponseEntity<>(body, HttpStatus.OK); - } catch (Exception e) { - return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + Optional versionInfo = versionResolver.resolveCurrentVersion(); + versionResponse = new VersionResponse(versionInfo.get()); + } catch (IOException e) { + throw new RuntimeException(e); } + return versionResponse; } @PostMapping("/error") diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java new file mode 100644 index 0000000000..0171c1ac4c --- /dev/null +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java @@ -0,0 +1,10 @@ +package org.mobilitydata.gtfsvalidator.web.service.controller; + +import lombok.AllArgsConstructor; +import lombok.Data; + +@Data +@AllArgsConstructor +public class VersionResponse { + private String version; +} \ No newline at end of file From 336503004d7ba8be98e606749864757677a48d3f Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Wed, 9 Aug 2023 09:20:58 -0400 Subject: [PATCH 09/12] update open-api-spec.json --- web/service/open-api-spec.json | 20 +++++++++++++++++++ .../controller/ValidationController.java | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/web/service/open-api-spec.json b/web/service/open-api-spec.json index a39e6f359e..aa43fd253e 100644 --- a/web/service/open-api-spec.json +++ b/web/service/open-api-spec.json @@ -107,6 +107,26 @@ "security": [] } }, + "/version": { + "get": { + "summary": "version", + "description": "This endpoint returns the current version of gtfs validator", + "operationId": "version", + "responses": { + "200": { + "description": "", + "headers": {}, + "content": { + "text/plain": { + "schema": {} + } + } + } + }, + "deprecated": false, + "security": [] + } + }, "/error": { "post": { "summary": "error", diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 213b3a5d0f..193c5e0722 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -129,13 +129,13 @@ public ResponseEntity runValidator( } @GetMapping("/version") - public VersionResponse currentVersion() { + public VersionResponse currentVersion() { VersionResponse versionResponse; try { Optional versionInfo = versionResolver.resolveCurrentVersion(); versionResponse = new VersionResponse(versionInfo.get()); } catch (IOException e) { - throw new RuntimeException(e); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Error", e); } return versionResponse; } From 4a6fc2a8f7d78b5a9a08d5a8e6225923700803fc Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Wed, 9 Aug 2023 09:43:52 -0400 Subject: [PATCH 10/12] add tests for VersionEndpoint --- .../controller/ValidationController.java | 8 +-- .../service/controller/VersionResponse.java | 4 +- .../controller/VersionEndpointTest.java | 54 +++++++++++++++++++ 3 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 web/service/src/test/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionEndpointTest.java diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 193c5e0722..6d9a69547b 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -24,8 +24,6 @@ import java.nio.file.Path; import java.time.Duration; import java.util.*; - -import org.mobilitydata.gtfsvalidator.util.VersionInfo; import org.mobilitydata.gtfsvalidator.util.VersionResolver; import org.mobilitydata.gtfsvalidator.web.service.util.JobMetadata; import org.mobilitydata.gtfsvalidator.web.service.util.StorageHelper; @@ -129,10 +127,14 @@ public ResponseEntity runValidator( } @GetMapping("/version") - public VersionResponse currentVersion() { + public VersionResponse currentVersion() { VersionResponse versionResponse; try { Optional versionInfo = versionResolver.resolveCurrentVersion(); + if (versionInfo.isEmpty()) { + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, "Current Version Not Found"); + } versionResponse = new VersionResponse(versionInfo.get()); } catch (IOException e) { throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Error", e); diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java index 0171c1ac4c..f1b439e570 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionResponse.java @@ -6,5 +6,5 @@ @Data @AllArgsConstructor public class VersionResponse { - private String version; -} \ No newline at end of file + private String version; +} diff --git a/web/service/src/test/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionEndpointTest.java b/web/service/src/test/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionEndpointTest.java new file mode 100644 index 0000000000..82f1e4dff3 --- /dev/null +++ b/web/service/src/test/java/org/mobilitydata/gtfsvalidator/web/service/controller/VersionEndpointTest.java @@ -0,0 +1,54 @@ +package org.mobilitydata.gtfsvalidator.web.service.controller; + +import static org.mockito.Mockito.*; + +import java.io.IOException; +import java.util.Optional; +import org.junit.jupiter.api.Test; +import org.mobilitydata.gtfsvalidator.util.VersionResolver; +import org.mobilitydata.gtfsvalidator.web.service.util.StorageHelper; +import org.mobilitydata.gtfsvalidator.web.service.util.ValidationHandler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.MockMvcResultMatchers; + +@WebMvcTest(ValidationController.class) +public class VersionEndpointTest { + @Autowired private MockMvc mockMvc; + @MockBean private StorageHelper storageHelper; + // must be mocked or application context fails to load correctly + @MockBean private ValidationHandler handler; + @MockBean private VersionResolver versionResolver; + + private final String newVersion = "myVersion"; + + @Test + public void testVersionEndpoint() throws Exception { + doReturn(Optional.of(newVersion)).when(versionResolver).resolveCurrentVersion(); + mockMvc + .perform(MockMvcRequestBuilders.get("/version").contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.jsonPath("$.version").isString()) + .andExpect(MockMvcResultMatchers.jsonPath("$.version").value(newVersion)); + } + + @Test + public void testFailedVersionEndpoint() throws Exception { + doThrow(new IOException()).when(versionResolver).resolveCurrentVersion(); + mockMvc + .perform(MockMvcRequestBuilders.get("/version").contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().is5xxServerError()); + } + + @Test + public void testVersionNotFound() throws Exception { + doReturn(Optional.empty()).when(versionResolver).resolveCurrentVersion(); + mockMvc + .perform(MockMvcRequestBuilders.get("/version").contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().is5xxServerError()); + } +} From 31f95c2d385ebe7eebb128970ce25c5e781eb8d3 Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Thu, 10 Aug 2023 10:02:44 -0400 Subject: [PATCH 11/12] remove TIMEOUT field --- .../web/service/controller/ValidationController.java | 1 - 1 file changed, 1 deletion(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 6d9a69547b..73324baea4 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -46,7 +46,6 @@ public class ValidationController { @Autowired private ValidationHandler validationHandler; @Autowired private VersionResolver versionResolver; - private static final Duration TIMEOUT = Duration.ofSeconds(5); /** * Creates a new job id and returns it to the client. If a url is provided, the file is downloaded From b0429e237814df7aef2a0c170b9ddee01e714e57 Mon Sep 17 00:00:00 2001 From: Jingsi Lu Date: Fri, 11 Aug 2023 09:45:08 -0400 Subject: [PATCH 12/12] format code --- .../web/service/controller/ValidationController.java | 1 - 1 file changed, 1 deletion(-) diff --git a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java index 73324baea4..61c8f1b3d1 100644 --- a/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java +++ b/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java @@ -22,7 +22,6 @@ import java.io.*; import java.net.URL; import java.nio.file.Path; -import java.time.Duration; import java.util.*; import org.mobilitydata.gtfsvalidator.util.VersionResolver; import org.mobilitydata.gtfsvalidator.web.service.util.JobMetadata;