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

Move Integration Tests to openrouteservice Module #1352

Merged
merged 27 commits into from
Mar 27, 2023

Conversation

koebi
Copy link
Collaborator

@koebi koebi commented Mar 21, 2023

Tasks

  • Move over all tests
  • Get rid of duplicate classes in integrationtests package
  • Strip down pom.xml (remove out-commented code, unncessary plug-in, unused lifecycle hooks)
  • Rename profile "surefire" to something more meaningful
  • Document new way of integration testing
  • fix flakey testConditionalAccess and testConditionalSpeed
  • fix GetStatusTest waiting for Kafka
  • delete openrouteservice-api-tests
  • Delete MyIntegrationTest
  • investigate cleanup ors.run for failed builds in maven-antrun-plugin
  • delete uncommented unittest config setup method

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.

Closes #1349
Closes #1345

Information about the changes

  • Key functionality added:
  • Reason for change:

Examples and reasons for differences between live ORS routes, and those generated from this pull request

Required changes to ors config (if applicable)

@takb takb added this to To do in ors general Mar 21, 2023
@jlink jlink changed the title Integrationtests poc Move Integration Tests to openrouteservice Module Mar 22, 2023
@MichaelsJP MichaelsJP marked this pull request as ready for review March 23, 2023 10:14
@MichaelsJP
Copy link
Member

@jlink @koebi One thing that just came up. Would it be possible to disable the debug logging of the integration tests in a normal run, maybe through an ENV variable?

The output is just so cluttered and confusing, and usually not needed in a normal run.

When an action fails, there is the option of re-executing an action in a debug session, which sets ACTIONS_RUNNER_DEBUG to true. We could let the integration tests listen to that variable and turn debug on/off conditionally. What do you think?

@MichaelsJP MichaelsJP requested review from MichaelsJP, takb and sfendrich and removed request for sfendrich March 24, 2023 12:38
Copy link
Contributor

@sfendrich sfendrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a few minor comments.

ors general automation moved this from To do to Review Mar 27, 2023
@jlink
Copy link
Contributor

jlink commented Mar 27, 2023

log config can be done in the ors.config.json right?

@jlink jlink requested a review from sfendrich March 27, 2023 08:40
koebi and others added 14 commits March 27, 2023 11:10
All relevant files have been moved to src/test/apitests and the like
We're using spring-boot mechanism to run apitests with the correct context.
We're not running them against the packaged jar or war file, so from the maven
pov they aren't integration tests.
This also enables us to run them with `mvn package`, using the `-Papitests` parameter.
With the API tests migration from a separate module to the openrouteservice
package, this isn't necessary anymore.
This is still a hack but better than a static sleep
@sfendrich sfendrich merged commit af96133 into master Mar 27, 2023
ors general automation moved this from Review to Awaiting release Mar 27, 2023
@sfendrich sfendrich deleted the integrationtests-poc branch March 27, 2023 10:16
Copy link
Member

@MichaelsJP MichaelsJP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.

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.

merge API tests to spring boot integration tests Move API-Tests into spring-boot IT test suite
4 participants