Skip to content

Commit f92b0bc

Browse files
committed
Increase ddb/dynamo_*.json#ApproximateCreationDateTime test precision to nanoseconds
* Refer to [Add support for DynamodbEvent.DynamodbStreamRecord serialization #455 comment for additional precision test](#455 (comment))
1 parent 232497a commit f92b0bc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

aws-lambda-java-tests/src/test/java/com/amazonaws/services/lambda/runtime/tests/EventLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private static void assertDynamodbStreamRecord(final DynamodbEvent.DynamodbStrea
182182
.returns("4421584500000000017450439092", StreamRecord::getSequenceNumber)
183183
.returns(59L, StreamRecord::getSizeBytes)
184184
.returns("NEW_AND_OLD_IMAGES", StreamRecord::getStreamViewType)
185-
.returns(Date.from(ofEpochSecond(1428537600)), StreamRecord::getApproximateCreationDateTime);
185+
.returns(Date.from(ofEpochSecond(1635734407).plusNanos(123456789)), StreamRecord::getApproximateCreationDateTime);
186186

187187
assertThat(streamRecord.getKeys())
188188
.isNotNull()

aws-lambda-java-tests/src/test/resources/ddb/dynamo_ddb_stream_record.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"N": "101"
2727
}
2828
},
29-
"ApproximateCreationDateTime": 1428537600.0,
29+
"ApproximateCreationDateTime": 1.635734407123456789E9,
3030
"SequenceNumber": "4421584500000000017450439092",
3131
"SizeBytes": 59,
3232
"StreamViewType": "NEW_AND_OLD_IMAGES"

aws-lambda-java-tests/src/test/resources/ddb/dynamo_event.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"N": "101"
6060
}
6161
},
62-
"ApproximateCreationDateTime": 1428537600,
62+
"ApproximateCreationDateTime": 1.635734407123456789E9,
6363
"SequenceNumber": "4421584500000000017450439092",
6464
"SizeBytes": 59,
6565
"StreamViewType": "NEW_AND_OLD_IMAGES"

0 commit comments

Comments
 (0)