https://linen.dev logo
#help
Title
# help
v

Vamsh S

07/27/2023, 8:50 AM
My Question is about Wiremock cross platform issues - MacOS vs Windows. Our team has been doing wiremock recording on lates MacOS for a while and they were going good. But when I tried the same recording on window 10 using Java 11.0.19 - i see few of the recording are not getting saved. So the the playback is failing... The wire mock version is - com.github.tomakehurstwiremock jre82.33.0 Any suggestion on how to fix this.. I can share more details so plz feel free to ask for any futher info.
regarding the dependency - this is what i find in build file -
testImplementation "org.springframework.cloud:spring-cloud-contract-wiremock:3.1.3
image.png
o

Oleg Nenashev

07/27/2023, 10:00 AM
Hi. To start with, do you have any logs to share? Updating to the most recent version of WireMock 2 would be advised, but at the same time I'm not the way to do any specific Windows compatibility bug. At the same time we do not test with Windows 10 but I don't think there would be much difference from the support versions of 11
v

Vamsh S

07/27/2023, 11:34 AM
@Oleg Nenashev - thanks for suggestion.. I am not sure how I am getting work mock dependency..
it seems to be comming from "spring cloud wiremock" but since i have given testImplementation i.e
testImplementation "org.springframework.cloud:spring-cloud-contract-wiremock:3.1.3
I should not be able to use wiremock in my project code.. but i am able to use it in project code
o

Oleg Nenashev

07/27/2023, 11:48 AM
This lib declares a standard dependency on WireMock, so you will be able to use it in the test scope
You can always force the dependency on WireMock 2.35.0 by setting an explicit dependency, but going beyond to 3.x beta will need setting up JAR excludes due to the artifact name change
v

Vamsh S

07/27/2023, 11:51 AM
well Oleg, thanks for clarification.. I updated to 2.35.0 - but still same issue..
it is missing recordings or is only recording one of the request
how do i get any wiremock specific logs.. so i can share.. which classes should i configure for higher log level.. 🙂 thanks for your suggestion
this what i see in intellij - com.abc.retail.esl.catalogtranslation.CatalogTranslationServiceException: Request to /v2/rosetta-stone failed with status code 404 for request payload: {"brandCatalogId":"21","optionCombinationIds":[72322190,51721857,101673097,78280125,74822333,78933196,68920113,50452270],"sprIds":null}. Response Body was: Request was not matched ======================= ----------------------------------------------------------------------------------------------------------------------- | Closest stub | Request | ----------------------------------------------------------------------------------------------------------------------- | retail-esl-liteship_liteship_getvirtualbasketshipcosts | | GET | POST <<<<< HTTP method does not match /retail-esl-liteship/liteship/getVirtualBasketShipCosts?S | /retail-catalog-translation/v2/rosetta-stone <<<<< URL does not match KUList=BZV10949,LGLY9948,FSWY1397,FV87791,KTX10014,NDPH24 | 49,BGLS8621&QtyList=1,1,1,1,1,1,1&CallerSource=RetailESL& | PostalCodeOrZone=02116&OptionList=&OptionList=32235706,59 | 049448&OptionList=41757060&OptionList=&OptionList=&Option | List=&OptionList=48078895&SoID=81&BclgID=12&CyID=1 | | x-esl-txn-id: ocids-no-promo | x-esl-txn-id: ocids-no-promo x-esl-body-hash: | x-esl-body-hash: 1862230103 <<<<< Header does not match | | ----------------------------------------------------------------------------------------------------------------------- at app//com.abc.retail.esl.catalogtranslation.CatalogTranslationService.send(CatalogTranslationService.java:196) at app//com.abc.retail.esl.catalogtranslation.CatalogTranslationService$RosettaStoneExecutor.getIdentifiers(CatalogTranslationService.java:257) at app//com.abc.retail.esl.catalogtranslation.CatalogTranslationService$RosettaStoneExecutor.lambda$getRosettaStones$0(CatalogTranslationService.java:232) at java.base@11.0.19/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base@11.0.19/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) ...... more logs.. can not send because of message size retrictions --
this request (
/retail-catalog-translation/v2/rosetta-stone
) is not there in the stub so it's try to find a closest match but the closet match is so different.. so it fails..
some data to share -- @Oleg Nenashev and @Tom (if you want to get involved.. sorry for pulling )
on left is the recording as on macOS - which has full recording.. on right is the reording on windows 10 - which has only partial recording.. those in the compare are the urls.
any meaning full pattern over there that can help 🤔
i can't see anything other than url's with query params are being sucessfull or are in both recordings
@Ivan Golovko - any thing you can suggest for this thread
@Oleg Nenashev - any thing you can comment based on the additional info i added above.
o

Oleg Nenashev

07/28/2023, 7:55 AM
Hi @Vamsh S please keep in mind it is a community channel. We provide no SLA, and everyone has other commitments and their own lives (e g. I am on vacation and doing solo parenting). So some patience is needed
😄 1
2 Views