@Test public void testRetry() throws StorageException, IOException, URISyntaxException { CAUSE_INIT_FAILURE.set(true); CAUSE_SEGMENT_FAILURE.set(true); CAUSE_UPLOAD_COMPLETE_FAILURE.set(true); MarkupResult markup = createMarkupResult(); URI localUri = URI.create(markup.getMarkupUri()); _nginxStorageService.store(markup); String remoteLocation = markup.getMarkupUri(); assertEquals(getExpectedUri(TEST_FILE_SHA), URI.create(remoteLocation)); assertFalse(Files.exists(Paths.get(localUri))); }
@Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } @Inject  CustomNginxStorageBackend(
            PropertiesUtil propertiesUtil,
            ObjectMapper objectMapper,
            InProgressBatchJobsService inProgressBatchJobs); }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } @Inject  CustomNginxStorageBackend(
            PropertiesUtil propertiesUtil,
            ObjectMapper objectMapper,
            InProgressBatchJobsService inProgressBatchJobs); @Override boolean canStore(JsonOutputObject outputObject); @Override URI store(JsonOutputObject outputObject); @Override boolean canStore(MarkupResult markupResult); @Override void store(MarkupResult markupResult); @Override boolean canStore(ArtifactExtractionRequest request); @Override Table<Integer, Integer, URI> storeArtifacts(ArtifactExtractionRequest request); URI store(URI serviceUri, InputStream content); }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } @Inject  CustomNginxStorageBackend(
            PropertiesUtil propertiesUtil,
            ObjectMapper objectMapper,
            InProgressBatchJobsService inProgressBatchJobs); @Override boolean canStore(JsonOutputObject outputObject); @Override URI store(JsonOutputObject outputObject); @Override boolean canStore(MarkupResult markupResult); @Override void store(MarkupResult markupResult); @Override boolean canStore(ArtifactExtractionRequest request); @Override Table<Integer, Integer, URI> storeArtifacts(ArtifactExtractionRequest request); URI store(URI serviceUri, InputStream content);  }