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

MockServerConfig defaults and pact-php speed enhancements #322

Merged
merged 3 commits into from
Jul 14, 2023
Merged

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Jul 14, 2023

continuation of @slt's changes in #316 and #315 with appropriate commit messages.

slt and others added 3 commits July 14, 2023 17:24
* Fix config setters returning a interface which prevents
  chaining when static analysis tools are in use as the
  interfaces are only a subset of what the class can do.

* Set defaults similar to MockServerEnvConfig for
  timeouts as these are typed but not set to a value
  by default, forcing you to set them to avoid an error.
Pact consumer tests are supposed to be like unit tests
but mine were taking 2 seconds+ each, the majority of which was a
php sleep()

Lots of unnecessary sleeps were slowing down my api and message tests.

* Allow SetHealthCheckRetrySec / PACT_MOCK_SERVER_HEALTH_CHECK_RETRY_SEC
  to be a float so it can be set to 0.1 instead of 1.

* Use usleep instead of sleep so that the retry seconds can be a < 1 second.

* Increase the total number of attempts so it still tries for ~10 seconds.

* Remove sleeps when PactMessage which do not appear to be needed.
@YOU54F YOU54F merged commit 43d2e2c into master Jul 14, 2023
39 checks passed
This was referenced Jul 14, 2023
@mefellows mefellows deleted the slt-fast branch July 18, 2023 01:38
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.

None yet

2 participants