File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
main/kotlin/com/cosmotech/dataset/service
test/kotlin/com/cosmotech/dataset/service Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -330,16 +330,18 @@ class DatasetServiceImpl(
330330 DatasetSourceType .AzureStorage -> {
331331 if (dataset.status == Dataset .Status .PENDING ) {
332332 dataset.source!! .takeIf { ! it.jobId.isNullOrEmpty() }
333- ? : throw IllegalStateException (" Dataset doesn't have a job id to get status from. Refresh dataset first." )
333+ ? : throw IllegalStateException (
334+ " Dataset doesn't have a job id to get status from. Refresh dataset first." )
334335 val twingraphImportJobInfoRequest =
335- TwingraphImportJobInfoRequest (this , dataset.source!! .jobId!! , organizationId)
336+ TwingraphImportJobInfoRequest (this , dataset.source!! .jobId!! , organizationId)
336337
337338 this .eventPublisher.publishEvent(twingraphImportJobInfoRequest)
338339
339340 dataset.apply {
340341 when (twingraphImportJobInfoRequest.response) {
341342 " Succeeded" -> status = Dataset .Status .READY
342- " Error" , " Failed" -> status = Dataset .Status .ERROR
343+ " Error" ,
344+ " Failed" -> status = Dataset .Status .ERROR
343345 }
344346 datasetRepository.save(this )
345347 }
Original file line number Diff line number Diff line change @@ -347,8 +347,7 @@ class DatasetServiceImplTests {
347347 source = SourceInfo (location = " test" , jobId = " 0" ),
348348 twingraphId = " twingraphId" )
349349 mockkConstructor(TwingraphImportJobInfoRequest ::class )
350- every { anyConstructed<TwingraphImportJobInfoRequest >().response } returns
351- " Succeeded"
350+ every { anyConstructed<TwingraphImportJobInfoRequest >().response } returns " Succeeded"
352351 every { datasetRepository.findById(DATASET_ID ) } returns Optional .of(dataset)
353352 every { csmJedisPool.resource.exists(any<String >()) } returns true
354353 every { datasetRepository.save(any()) } returnsArgument 0
You can’t perform that action at this time.
0 commit comments