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

Java Instant is treated as Decimal during provider verfication #1778

Open
danielr1996 opened this issue Mar 16, 2024 · 2 comments
Open

Java Instant is treated as Decimal during provider verfication #1778

danielr1996 opened this issue Mar 16, 2024 · 2 comments

Comments

@danielr1996
Copy link

I have basically the same problem as #1754 but on the provider side. I have a consumer project that generated the following pact file

...
"response": {
        "body": {
          "id": "421b1b7a-d651-4821-89a6-5dc588cf3cc5",
          "state": "QUEUED",
          "submitted": "2024-03-14T12:11:14Z"
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "status": 201
      }
...

Verifying the provider gives me the following error:

1.1) body: $.submitted Expected 1710418274.000000000 (Decimal) to be equal to '2024-03-14T12:11:14Z' (String)

The expected value is the unix epoch representation of that Instant, but why does pact expect that? I manually called the API and it actually returns the value as string.

@rholshausen
Copy link
Contributor

Can you provide the debug logs from your test and the actual request from the provider?

@danielr1996
Copy link
Author

Sorry for the late answer, since I tried using pact at work we implemented the feature without pact and moved on to other things, so it might take a while, but I will try to provide more details after the Easter holiday

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

No branches or pull requests

2 participants