Hi, I am trying <here> to build a sample project f...
# pact-jvm
r
Hi, I am trying here to build a sample project for an error I have, but now I run into another error I do not understand. It has to do with LocalDateTime. In my sample Project theoretically it should all work fine (shown as it is at the moment), but I run into the error:
Copy code
1) Verifying a pact between Consumer-Working and provider - consumer-test has a matching body

    1.1) body: $.lastResponse Expected [2021,5,10,16,40,55] to match a datetime of 'yyyy-MM-dd'T'HH:mm:ss': Unable to parse the date: [2021,5,10,16,40,55]
I did try to reproduce a local closed source project, so maybe I forgot to copy something over? At least the LocalDateTime String method here looks very odd (
[2021,5,10,16,40,55]
) In my other error message with our service it shows up as
2021-05-10T16:40:55
Anybody an idea what I am missing? 🙂
y
Hey @Ruth, I converted this return a string in the returned message, rather than a
LocalDateTime
and that at least allowed me to get to your original issue state. I assume your own project will serialise these values into strings when sending them over the wire. Added comments to your original post here https://github.com/pact-foundation/pact-jvm/issues/1726#issuecomment-1805958698 with hopefully a workaround to get you out a bind for the moment
thankyou 1
r
thank you so much for all your effort, I will look at that directly on Monday 🙂