Skip to content

Commit 8a201cc

Browse files
committed
Calculate timestamp once in streaming test
1 parent 7d75335 commit 8a201cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

eventstream_rpc/tests/EventStreamClientTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,8 +1628,9 @@ AWS_TEST_CASE(EchoClientStreamingOperationEchoSuccessBoolean, s_TestEchoClientSt
16281628

16291629
static int s_TestEchoClientStreamingOperationEchoSuccessTime(struct aws_allocator *allocator, void *ctx)
16301630
{
1631+
auto ts = Aws::Crt::DateTime::Now();
16311632
return s_DoTestEchoClientStreamingOperationEchoSuccess(
1632-
allocator, [](MessageData &messageData) { messageData.SetTimeMessage(Aws::Crt::DateTime::Now()); });
1633+
allocator, [ts](MessageData &messageData) { messageData.SetTimeMessage(ts); });
16331634
}
16341635

16351636
AWS_TEST_CASE(EchoClientStreamingOperationEchoSuccessTime, s_TestEchoClientStreamingOperationEchoSuccessTime);

0 commit comments

Comments
 (0)