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

Replace com.google.common.base.Function (partly) #2121

Merged
merged 23 commits into from May 31, 2023

Conversation

pks-1981
Copy link
Contributor

@pks-1981 pks-1981 commented Mar 31, 2023

Replace com.google.common.base.Function (partly)

For #2111

@timtebeek
Copy link
Contributor

Are you making these changes by hand @pks-1981 ? You might want to have a look at these Guava recipes. I'm in the process of covering Optional there as well.

@pks-1981
Copy link
Contributor Author

Are you making these changes by hand @pks-1981 ? You might want to have a look at these Guava recipes. I'm in the process of covering Optional there as well.

Yes, only with my hands) I'm have more fun in doing it myself...

@timtebeek
Copy link
Contributor

Are you making these changes by hand @pks-1981 ? You might want to have a look at these Guava recipes. I'm in the process of covering Optional there as well.

Yes, only with my hands) I'm have more fun in doing it myself...

That's fine as well; even more appreciative of contributions made that way; Let's hope it's merged quickly without conflicts then!

requiredStates.addAll(
stubMappings.stream().map(StubMapping::getNewScenarioState).collect(Collectors.toList()));

return requiredStates.stream().filter(Objects::nonNull).collect(Collectors.toSet());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, small changes in the order of the final collection.

AdminApiTest -> void getScenarios()

  • assertThat(body, jsonPartEquals("scenarios[0].possibleStates", asList("2", "3", "Started")));
  • assertThat(body, jsonPartEquals("scenarios[0].possibleStates", asList("Started", "2", "3")));

@pks-1981
Copy link
Contributor Author

pks-1981 commented Apr 2, 2023

@timtebeek @tomakehurst waiting for review)

@pks-1981
Copy link
Contributor Author

pks-1981 commented Apr 6, 2023

@tomakehurst
maybe I'll merge my two MR?
if you're not planning merge soon...

@tomakehurst
Copy link
Member

@pks-1981 I'm on holiday this week, so please bear with me. Appreciate you opening these, and I plan to review them soon.

Kirill Peshin added 2 commits April 23, 2023 11:02
# Conflicts:
#	src/main/java/com/github/tomakehurst/wiremock/verification/diff/JUnitStyleDiffRenderer.java
Kirill Peshin added 3 commits April 24, 2023 20:00
# Conflicts:
#	src/main/java/com/github/tomakehurst/wiremock/standalone/JsonFileMappingsSource.java
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

All changes look good to me though I mostly rely on CI

@oleg-nenashev oleg-nenashev added the needs-tom Tom's Train Project :) label May 6, 2023
@oleg-nenashev
Copy link
Member

One test fails in a single configuration, likely to be a flaky one

ProxyAcceptanceTest > fixedDelaysAreAddedToProxiedResponses() FAILED
    java.lang.AssertionError: 
    Expected: a value equal to or greater than <300L>
         but: <299L> was less than <300L>
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
        at com.github.tomakehurst.wiremock.ProxyAcceptanceTest.fixedDelaysAreAddedToProxiedResponses(ProxyAcceptanceTest.java:558)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.github.tomakehurst.wiremock.common.xml.Xml (file:/D:/a/wiremock/wiremock/build/classes/java/main/) to constructor com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl()
WARNING: Please consider reporting this to the maintainers of com.github.tomakehurst.wiremock.common.xml.Xml
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

@pks-1981
Copy link
Contributor Author

pks-1981 commented May 6, 2023

One test fails in a single configuration, likely to be a flaky one

ProxyAcceptanceTest > fixedDelaysAreAddedToProxiedResponses() FAILED
    java.lang.AssertionError: 
    Expected: a value equal to or greater than <300L>
         but: <299L> was less than <300L>
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
        at com.github.tomakehurst.wiremock.ProxyAcceptanceTest.fixedDelaysAreAddedToProxiedResponses(ProxyAcceptanceTest.java:558)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.github.tomakehurst.wiremock.common.xml.Xml (file:/D:/a/wiremock/wiremock/build/classes/java/main/) to constructor com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl()
WARNING: Please consider reporting this to the maintainers of com.github.tomakehurst.wiremock.common.xml.Xml
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

"blinking" test?
Checked on my Windows 11.
image

@tomakehurst tomakehurst merged commit bc09611 into wiremock:master May 31, 2023
7 checks passed
@pks-1981 pks-1981 deleted the function branch June 1, 2023 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance needs-tom Tom's Train Project :)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants