-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Repurpose the RealtimeTestEnvironment into a TransitTestEnvironment #6899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repurpose the RealtimeTestEnvironment into a TransitTestEnvironment #6899
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6899 +/- ##
=============================================
+ Coverage 72.10% 72.17% +0.06%
- Complexity 19654 19833 +179
=============================================
Files 2123 2155 +32
Lines 79410 80044 +634
Branches 8049 8082 +33
=============================================
+ Hits 57257 57770 +513
- Misses 19316 19425 +109
- Partials 2837 2849 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This will probably conflict with #6894 |
|
#6894 has been merged so you will have to resolve the conflicts. The service dates are now part of TripInput, not the environment so it's configurable. |
.../test/java/org/opentripplanner/updater/trip/gtfs/moduletests/rejection/InvalidInputTest.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/updater/trip/TripUpdateBuilder.java
Show resolved
Hide resolved
...tion/src/test/java/org/opentripplanner/updater/trip/gtfs/moduletests/addition/AddedTest.java
Outdated
Show resolved
Hide resolved
f2982d2 to
8774d9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a full review, only touching a few architectural issues - when these are resolved I will look at the rest of the code.
application/src/test/java/org/opentripplanner/transit/model/_data/TransitTestEnvironment.java
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/service/TripTimesOnDateTest.java
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/StopCallImplTest.java
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/apis/gtfs/service/ApiTransitServiceTest.java
Outdated
Show resolved
Hide resolved
...cation/src/test/java/org/opentripplanner/transit/model/_data/FeedScopedIdForTestFactory.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/TransitTestEnvironment.java
Outdated
Show resolved
Hide resolved
...ion/src/test/java/org/opentripplanner/transit/model/_data/TransitTestEnvironmentBuilder.java
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/TripOnDateDataFetcher.java
Outdated
Show resolved
Hide resolved
...tion/src/test/java/org/opentripplanner/updater/trip/gtfs/moduletests/addition/AddedTest.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestConstants.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've picked up on a few things.
I know that we have different opinions on string constants, so I'm happy to go along with your way of doing things.
...on/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryTestBuilder.java
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/TransitTestEnvironment.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the how easily we can move away from TimetableRepositoryForTest if we don't return builders.
...ion/src/test/java/org/opentripplanner/transit/model/_data/TransitTestEnvironmentBuilder.java
Outdated
Show resolved
Hide resolved
...cation/src/test/java/org/opentripplanner/transit/model/_data/FeedScopedIdForTestFactory.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/FlexTripInput.java
Outdated
Show resolved
Hide resolved
...on/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryTestBuilder.java
Outdated
Show resolved
Hide resolved
...cation/src/test/java/org/opentripplanner/transit/model/_data/FeedScopedIdForTestFactory.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/TripInput.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/TripOnDateDataFetcher.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give you permission to merge this in my absence even if you have to make changes.
adfa6a7
into
opentripplanner:dev-2.x
Summary
This is a first refactor of the RealtimeTestEnvironment after discussion with @t2gran and @leonardehrenfried. There will be more upcoming changes.
The purpose is to make the RealtimeTestEnvironment into a more general framework for setting up and testing transit entities.
It only touches tests and should be a pure refactor.
TimetableRepositoryForTest.TripOnDateDataFetcherto simplify fetching data from the TransitModel.Issue
#6887
Bumping the serialization version id
No