Skip to content

Commit

Permalink
ALS-7810: Attempt to fix parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Nov 20, 2024
1 parent c5c3d77 commit 67b1b77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class SignUrlService {
private final int signedUrlExpiryMinutes;
private final Region region;

private final S3Client s3;

private static Logger log = LoggerFactory.getLogger(SignUrlService.class);

@Autowired
Expand All @@ -37,13 +39,13 @@ public SignUrlService(
this.bucketName = bucketName;
this.signedUrlExpiryMinutes = signedUrlExpiryMinutes;
this.region = Region.of(region);
}

public void uploadFile(File file, String objectKey) {
S3Client s3 = S3Client.builder()
.region(region)
s3 = S3Client.builder()
.region(this.region)
.build();
}

public void uploadFile(File file, String objectKey) {
putS3Object(s3, bucketName, objectKey, file);
s3.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void writeValidPFB() {
PfbWriter pfbWriter = new PfbWriter(new File("target/test-result.avro"), UUID.randomUUID().toString(), dictionaryService);

Mockito.when(dictionaryService.getConcepts(List.of("patient_id", "\\demographics\\age\\", "\\phs123\\stroke\\")))
.thenReturn(List.of(new Concept("Categorical", "\\demographics\\age\\", "age", "AGE", "demographics", "patient age", Map.of("drs_uri", "a-drs.uri"))));
.thenReturn(List.of(new Concept("Categorical", "\\demographics\\age\\", "age", "AGE", null, "patient age", Map.of("drs_uri", "[\"a-drs.uri\", \"another-drs.uri\"]"))));

pfbWriter.writeHeader(new String[] {"patient_id", "\\demographics\\age\\", "\\phs123\\stroke\\"});
List<List<String>> nullableList = new ArrayList<>();
Expand Down

0 comments on commit 67b1b77

Please sign in to comment.