From 47d1636bb7e4dc366763fc9ec756cc6da31e5adf Mon Sep 17 00:00:00 2001 From: Robin Beer Date: Thu, 20 Jul 2023 16:35:48 +0100 Subject: [PATCH] refactor(EditorControllerTest.java): Changed feed source to one that has less test data --- .../editor/controllers/api/EditorControllerTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/conveyal/datatools/editor/controllers/api/EditorControllerTest.java b/src/test/java/com/conveyal/datatools/editor/controllers/api/EditorControllerTest.java index 45a658b3f..b6ead3b37 100644 --- a/src/test/java/com/conveyal/datatools/editor/controllers/api/EditorControllerTest.java +++ b/src/test/java/com/conveyal/datatools/editor/controllers/api/EditorControllerTest.java @@ -73,7 +73,7 @@ public static void setUp() throws Exception { Persistence.feedSources.create(feedSourceCascadeDelete); feedVersion = createFeedVersionFromGtfsZip(feedSource, "bart_old.zip"); - feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "bart_old.zip"); + feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "caltrain_gtfs_lite.zip"); // Create and run snapshot jobs crateAndRunSnapshotJob(feedVersion.name, feedSource.id, feedVersion.namespace); @@ -172,15 +172,15 @@ public void canPatchStopsConditionally() throws IOException { void canCascadeDeleteStop() throws IOException, SQLException { // Get a fresh feed source so that the editor namespace was updated after snapshot. FeedSource freshFeedSource = Persistence.feedSources.getById(feedVersionCascadeDelete.feedSourceId); - String stopId = "WARM"; + String stopId = "Bayshore Caltrain"; String stopCountSql = getCountSql(freshFeedSource.editorNamespace, "stops", stopId); String stopTimesCountSql = getCountSql(freshFeedSource.editorNamespace, "stop_times", stopId); String patternStopsCountSql = getCountSql(freshFeedSource.editorNamespace, "pattern_stops", stopId); // Check for presence of stopId in stops, stop times and pattern stops. assertThatSqlCountQueryYieldsExpectedCount(stopCountSql, 1); - assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 522); - assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 4); + assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 1); + assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 1); String path = String.format( "/api/editor/secure/stop/%s/cascadeDeleteStop?feedId=%s&sessionId=test",