Skip to content

Commit

Permalink
Remove placeholder code to reflect updated requirements
Browse files Browse the repository at this point in the history
We won't be preventing these after all.
Current plan is to instead show a warning to the user in the UI.

See HSLdevcom/jore4#1566
  • Loading branch information
Leitsi committed Dec 4, 2023
1 parent fed8844 commit c67b634
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ class CombineTimetablesService(
)
}

// TODO: ensure that there are no identical journeys in staging and target.
// DB triggers do not ensure this.

LOGGER.info("Moving staging vehicle services to target...")
moveStagingVehicleServicesToTarget(
stagingFrame = stagingVehicleScheduleFrame,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class CombineTimetablesServiceTest @Autowired constructor(
}

@Test
fun `fails when target frame already contains the staging vehicle journey`() {
fun `combines a vehicle journey that already exists in the target frame`() {
val testData = TimetablesDataset.createFromResource("datasets/combine.json")

val stagingBlock = testData
Expand All @@ -326,9 +326,6 @@ class CombineTimetablesServiceTest @Autowired constructor(
timetablesDataInserterRunner.truncateAndInsertDataset(testData.toJSONString())
val stagingFrameId = UUID.fromString("aa0e95c6-34d1-4d09-8546-3789b04ea494")

// FIXME: this should fail instead. The service currently works incorrectly in this case.
// Also, check correct exception class.
// Might need more robust tests than just this one case (at least for valid corner cases).
val result = combineTimetablesService.combineTimetables(
listOf(stagingFrameId),
TimetablesPriority.STANDARD
Expand Down

0 comments on commit c67b634

Please sign in to comment.