Skip to content

Updated TankHttpClientTests to use mock local server (WireMock)#258

Merged
Zakaria-Kofiro merged 3 commits intomasterfrom
zkofiro/http-client-test-fix
Aug 11, 2023
Merged

Updated TankHttpClientTests to use mock local server (WireMock)#258
Zakaria-Kofiro merged 3 commits intomasterfrom
zkofiro/http-client-test-fix

Conversation

@Zakaria-Kofiro
Copy link
Collaborator

@Zakaria-Kofiro Zakaria-Kofiro commented Aug 9, 2023

Updated TankHttpClientTests to use mock server (WireMock)

Updated tests to make calls to a mock server instead of httpbin.org, eliminating the need to connect and depend on it during test runs (which has resulted in a lot of inconsistent test failures). Instead, it makes use of WireMock for its mock server, alongside the mock API sample (httpbin.org-stubs.json) for httpbin.org itself. This creates a mock API server that simulates the behavior and responses of httpbin.org with no changes to what is being tested.

This also cuts down the total average test time duration from several minutes to 3-4 seconds.

Please make sure these check boxes are checked before submitting

  • ** Squashed Commits **
  • ** All Tests Passed ** - mvn clean test -P default

** PR review process **

  • Requires one +1 from a reviewer
  • Repository owners will merge your PR once it is approved.

@Zakaria-Kofiro Zakaria-Kofiro merged commit cefa8e5 into master Aug 11, 2023
@Zakaria-Kofiro Zakaria-Kofiro deleted the zkofiro/http-client-test-fix branch August 11, 2023 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants