Skip to content
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

fix(api-tests): Test based on mock HERE traffic data #1449

Merged
merged 26 commits into from
Jun 13, 2023

Conversation

aoles
Copy link
Member

@aoles aoles commented May 25, 2023

Pull Request Checklist

  • 1. I have rebased the latest version of the master branch into my feature branch and all conflicts
    have been resolved.
  • 2. I have added information about the change/addition to functionality to the CHANGELOG.md file under the
    [Unreleased] heading.
  • 3. I have documented my code using JDocs tags.
  • 4. I have removed unnecessary commented out code, imports and System.out.println statements.
  • 5. I have written JUnit tests for any new methods/classes and ensured that they pass.
  • 6. I have created API tests for any new functionality exposed to the API.
  • 7. If changes/additions are made to the ors-config.json file, I have added these to the ors config documentation
    along with a short description of what it is for, and documented this in the Pull Request (below).
  • 8. I have built graphs with my code of the Heidelberg.osm.gz file and run the api-tests with all test passing
  • 9. I have referenced the Issue Number in the Pull Request (if the changes were from an issue).
  • 10. For new features or changes involving building of graphs, I have tested on a larger dataset
    (at least Germany), and the graphs build without problems (i.e. no out-of-memory errors).
  • 11. For new features or changes involving the graphbuilding process (i.e. changing encoders, updating the
    importer etc.), I have generated longer distance routes for the affected profiles with different options
    (avoid features, max weight etc.) and compared these with the routes of the same parameters and start/end
    points generated from the current live ORS.
    If there are differences then the reasoning for these MUST be documented in the pull request.
  • 12. I have written in the Pull Request information about the changes made including their intended usage
    and why the change was needed.
  • 13. For changes touching the API documentation, I have tested that the API playground renders correctly.

Fixes #1403.
Also: some further improvements on #1430

Information about the changes

API test for the functionality of traffic-enabled routing based on HERE-like traffic data.

@takb takb added this to To do in ors general May 25, 2023
@MichaelsJP MichaelsJP changed the title fix (api-tests): Test based on mock HERE traffic data fix(api-tests): Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot added the fix label May 25, 2023
@MichaelsJP MichaelsJP changed the title fix(api-tests): Test based on mock HERE traffic data fix(api-tests)!: Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot removed the fix label May 25, 2023
@MichaelsJP MichaelsJP changed the title fix(api-tests)!: Test based on mock HERE traffic data fix(api-tests): Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot added the fix label May 25, 2023
@MichaelsJP MichaelsJP changed the title fix(api-tests): Test based on mock HERE traffic data fix!: Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot removed the fix label May 25, 2023
@MichaelsJP MichaelsJP changed the title fix!: Test based on mock HERE traffic data fix(api-tests): Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot added the fix label May 25, 2023
@MichaelsJP MichaelsJP changed the title fix(api-tests): Test based on mock HERE traffic data fix!: Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot removed the fix label May 25, 2023
@MichaelsJP MichaelsJP changed the title fix!: Test based on mock HERE traffic data fix(api-tests)!: Test based on mock HERE traffic data May 25, 2023
@MichaelsJP MichaelsJP changed the title fix(api-tests)!: Test based on mock HERE traffic data fix(api-tests): Test based on mock HERE traffic data May 25, 2023
@github-actions github-actions bot added fix and removed fix labels May 25, 2023
@GIScience GIScience deleted a comment from MichaelsJP May 30, 2023
@github-actions github-actions bot added the fix label May 30, 2023
@aoles
Copy link
Member Author

aoles commented May 30, 2023

Not sure why the API test still fails on the GitHub runner, as for me it passes locally.

@aoles
Copy link
Member Author

aoles commented May 30, 2023

The API test fails on the GitHub runner with the following:

Error:    ResultTest.testTrafficSpeed:3656 1 expectation failed.
JSON path routes[0].summary.duration doesn't match.
Expected: is a numeric value within <1.0> of <495.0>
  Actual: <477.9>

The failure could be related to the fact that the server on which the API test is being executed uses a different time zone than the internally hard coded "Europe/Berlin".

@aoles
Copy link
Member Author

aoles commented May 31, 2023

So far I had no luck in reproducing the error locally by changing the local time zone on the machine on which the test is being executed.

With the "fix" introducing multiple snapping points it fails for me locally too 🙈

@aoles
Copy link
Member Author

aoles commented Jun 1, 2023

With the updated test dataset the reported difference is now:

Error:    ResultTest.testTrafficSpeed:3656 1 expectation failed.
JSON path routes[0].summary.duration doesn't match.
Expected: is a numeric value within <1.0> of <495.0>
  Actual: <337.0>

@takb takb force-pushed the fix/traffic_data_api_test branch from 2a36fb0 to e387c03 Compare June 7, 2023 10:39
aoles and others added 5 commits June 12, 2023 14:27
No duplicate edges anymore. The two bridges are now represented as one ways on each side.
In order to integrate GH's map matching we facade it with
the ORS MapMatcher inteface.
Reversing the geometry in TrafficLink does not seem
to make sense and leads to worse results. Therefore,
the reversion is commented out, but left in the code
for future investigation.
@github-actions github-actions bot added the fix label Jun 13, 2023
@takb takb force-pushed the fix/traffic_data_api_test branch from 576e783 to 2e75318 Compare June 13, 2023 07:20
@takb takb enabled auto-merge June 13, 2023 07:30
@MichaelsJP MichaelsJP self-requested a review June 13, 2023 08:27
@github-actions github-actions bot added fix and removed fix labels Jun 13, 2023
ors general automation moved this from To do to Review Jun 13, 2023
@takb takb force-pushed the fix/traffic_data_api_test branch from 4c67c86 to abcddaa Compare June 13, 2023 11:03
@takb takb requested a review from MichaelsJP June 13, 2023 11:21
@github-actions github-actions bot added fix and removed fix labels Jun 13, 2023
@MichaelsJP
Copy link
Member

LGTM

@takb takb merged commit f9c2be4 into master Jun 13, 2023
21 checks passed
ors general automation moved this from Review to Awaiting release Jun 13, 2023
@takb takb deleted the fix/traffic_data_api_test branch June 13, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
ors general
  
Awaiting release
Development

Successfully merging this pull request may close these issues.

Here routing tests using mock data from #1393
4 participants