Skip to content

Commit

Permalink
🐛 Resolve NoSuchElementException in MappingExecutionEndpoint test
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukan10 committed Sep 17, 2024
1 parent 8469f99 commit be7dc82
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,10 @@ class MappingExecutionEndpointTest extends BaseEndpointTest with OnFhirTestConta
val success = waitForCondition(45) {
fsSinkFolder.listFiles.exists(_.getName.contains("results.csv")) && {
// read the csv file created in the file system
val csvFile: File = fsSinkFolder.listFiles.find(_.getName.contains("results.csv"))
.get.listFiles().find(file => file.getName.endsWith(".csv"))
.get
val outputFolder: File = fsSinkFolder.listFiles.find(_.getName.contains("results.csv")).get
val results = sparkSession.read
.option("header","true")
.csv(csvFile.getPath)
.csv(outputFolder.getPath)
// verify the row count
results.count() == 1
// verify the content of row
Expand Down

0 comments on commit be7dc82

Please sign in to comment.