You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% git log -n1
commit 5900e359365041ed9380947d010b0f0a853e793c (HEAD -> main, origin/main)
Author: David Chelimsky <dchelimsky@gmail.com>
Date: Wed Jul 12 10:04:32 2023
pass around shapes instead of entire service (#43)
Description with failing test case
In cognitect.client.impl-test/test-invoke-happy-path there's a discrepancy in the CreationDate timestamps provided by list-buckets-http-response and list-buckets-aws-client-response
This looks like it's due to precision limitations in java.text.SimpleDateFormat.
While I haven't found it in official documentation, java.text.SimpleDateFormat can only support millisecond precision, and it looks like it fails somewhat spectacularly with microsecond precision. It looks like what's happening is that it's considering the value to be #inst "2023-01-23T11:59:03" + 575496 millis:
Given this is an explicit example in the tests, it wouldn't surprise me if this test is there to explicitly document this behavior. That said, I don't see a comment in the source or the commit when this test was added that indicates this is in fact the case.
Is this known, accepted (if infelicitous) behavior?
While java.time.format.DateTimeFormatter can handle this, I believe aws-api is intended to still support pre-JDK8 platforms, so this might not be available. (awyeah-api doesn't have this particular platform limitation and I worked around this issue here: grzm/awyeah-api@2ac9da4)
The text was updated successfully, but these errors were encountered:
Dependencies
Description with failing test case
In
cognitect.client.impl-test/test-invoke-happy-path
there's a discrepancy in theCreationDate
timestamps provided bylist-buckets-http-response
andlist-buckets-aws-client-response
CreationDate
list-buckets-http-response
"2023-01-23T11:59:03.575496Z"
list-buckets-aws-client-response
"2023-01-23T12:08:38.496-00:00"
https://github.com/cognitect-labs/aws-api/blob/main/test/src/cognitect/client/impl_test.clj#L56-L100
This looks like it's due to precision limitations in
java.text.SimpleDateFormat
.While I haven't found it in official documentation,
java.text.SimpleDateFormat
can only support millisecond precision, and it looks like it fails somewhat spectacularly with microsecond precision. It looks like what's happening is that it's considering the value to be#inst "2023-01-23T11:59:03"
+ 575496 millis:https://stackoverflow.com/questions/30135025/java-date-parsing-with-microsecond-or-nanosecond-accuracy
Given this is an explicit example in the tests, it wouldn't surprise me if this test is there to explicitly document this behavior. That said, I don't see a comment in the source or the commit when this test was added that indicates this is in fact the case.
Is this known, accepted (if infelicitous) behavior?
While
java.time.format.DateTimeFormatter
can handle this, I believe aws-api is intended to still support pre-JDK8 platforms, so this might not be available. (awyeah-api doesn't have this particular platform limitation and I worked around this issue here: grzm/awyeah-api@2ac9da4)The text was updated successfully, but these errors were encountered: