Matchers.scala ignores timestamp format specification and only uses the TypeMatcher
See original GitHub issueIn pact-jvm-matchers 2.x, a PACT like
"$.body[0].write-timestamp": {
"match": "timestamp",
"timestamp": "yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSS\u0027Z\u0027"
}
erroneously rejects a value like 2017-08-11T02:54:42.522Z
with the error Expected '2017-08-11T02:54:42.522Z' to be a timestamp
.
This is likely to be caused by Matchers.scala
using the typeMatcher
instead of the timestampMatcher
to match timestamps. That causes to ignore the format specification, and only accept strict ISO formats.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Matchers.scala ignores timestamp format specification and ...
This is likely to be caused by Matchers.scala using the typeMatcher instead of the timestampMatcher to match timestamps. That causes to ignore ......
Read more >Using matchers - ScalaTest
Using matchers. ScalaTest provides a domain specific language (DSL) for expressing assertions in tests using the word should . Just mix in should....
Read more >Matching | Pact Docs
If the example value is omitted, a value will be generated using a Timestamp generator and the current system date and time. time,...
Read more >Spark (Scala) Parsing issue of a fields having timestamp ...
I think you only have to consider first 3 digits of milliseconds. ... use from_unixtime(unix_time(column, 'timestamp format'), 'format').
Read more >Expression functions in the mapping data flow - Microsoft Learn
Use the function syntax(true()) if there's a column named 'true'. typeMatch, Matches the type of the column. Can only be used in pattern ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I can do that.
I confirm that 2.4.19 fixes the bug.
Thank you for the quick response and release, I appreciate it!