Skip to content

Commit 47d1636

Browse files
Robin BeerRobin Beer
authored andcommitted
refactor(EditorControllerTest.java): Changed feed source to one that has less test data
1 parent 3cff05e commit 47d1636

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/com/conveyal/datatools/editor/controllers/api/EditorControllerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static void setUp() throws Exception {
7373
Persistence.feedSources.create(feedSourceCascadeDelete);
7474

7575
feedVersion = createFeedVersionFromGtfsZip(feedSource, "bart_old.zip");
76-
feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "bart_old.zip");
76+
feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "caltrain_gtfs_lite.zip");
7777

7878
// Create and run snapshot jobs
7979
crateAndRunSnapshotJob(feedVersion.name, feedSource.id, feedVersion.namespace);
@@ -172,15 +172,15 @@ public void canPatchStopsConditionally() throws IOException {
172172
void canCascadeDeleteStop() throws IOException, SQLException {
173173
// Get a fresh feed source so that the editor namespace was updated after snapshot.
174174
FeedSource freshFeedSource = Persistence.feedSources.getById(feedVersionCascadeDelete.feedSourceId);
175-
String stopId = "WARM";
175+
String stopId = "Bayshore Caltrain";
176176
String stopCountSql = getCountSql(freshFeedSource.editorNamespace, "stops", stopId);
177177
String stopTimesCountSql = getCountSql(freshFeedSource.editorNamespace, "stop_times", stopId);
178178
String patternStopsCountSql = getCountSql(freshFeedSource.editorNamespace, "pattern_stops", stopId);
179179

180180
// Check for presence of stopId in stops, stop times and pattern stops.
181181
assertThatSqlCountQueryYieldsExpectedCount(stopCountSql, 1);
182-
assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 522);
183-
assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 4);
182+
assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 1);
183+
assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 1);
184184

185185
String path = String.format(
186186
"/api/editor/secure/stop/%s/cascadeDeleteStop?feedId=%s&sessionId=test",

0 commit comments

Comments
 (0)