Skip to content

Commit

Permalink
refactor(Unit test and gtfs-lib update): Update to use refactored sto…
Browse files Browse the repository at this point in the history
…p time normalization (from gtfs
  • Loading branch information
Robin Beer authored and Robin Beer committed Jul 24, 2023
1 parent 47d1636 commit 946461f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
<dependency>
<groupId>com.github.conveyal</groupId>
<artifactId>gtfs-lib</artifactId>
<version>890bb29</version>
<version>97311fe</version>
<!-- Exclusions added in order to silence SLF4J warnings about multiple bindings:
http://www.slf4j.org/codes.html#multiple_bindings
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void setUp() throws Exception {
Persistence.feedSources.create(feedSourceCascadeDelete);

feedVersion = createFeedVersionFromGtfsZip(feedSource, "bart_old.zip");
feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "caltrain_gtfs_lite.zip");
feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "bart_old.zip");

// Create and run snapshot jobs
crateAndRunSnapshotJob(feedVersion.name, feedSource.id, feedVersion.namespace);
Expand Down Expand Up @@ -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 = "Bayshore Caltrain";
String stopId = "WARM";
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, 1);
assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 1);
assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 522);
assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 4);

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

0 comments on commit 946461f

Please sign in to comment.