@@ -533,3 +533,39 @@ TEST_F(PrestoToVeloxQueryConfigTest, sessionAndExtraCredentialsOverload) {
533533 EXPECT_EQ (" verify_key_xyz" , raw.at (" verification_key" ));
534534 }
535535}
536+
537+ TEST_F (PrestoToVeloxQueryConfigTest, sessionStartTimeConfiguration) {
538+ auto session = createBasicSession ();
539+
540+ // Test with session start time set in SessionRepresentation
541+ // The startTime is already set in createBasicSession() to 1234567890
542+ auto veloxConfig = toVeloxConfigs (session);
543+
544+ // Verify that session start time is properly passed through to VeloxQueryConfig
545+ EXPECT_EQ (1234567890 , veloxConfig.sessionStartTimeMs ());
546+
547+ // Test with different session start time
548+ session.startTime = 9876543210 ;
549+ auto veloxConfig2 = toVeloxConfigs (session);
550+
551+ EXPECT_EQ (9876543210 , veloxConfig2.sessionStartTimeMs ());
552+
553+ // Test with zero start time (valid edge case)
554+ session.startTime = 0 ;
555+ auto veloxConfig3 = toVeloxConfigs (session);
556+
557+ EXPECT_EQ (0 , veloxConfig3.sessionStartTimeMs ());
558+
559+ // Test with negative start time (valid edge case)
560+ session.startTime = -1000 ;
561+ auto veloxConfig4 = toVeloxConfigs (session);
562+
563+ EXPECT_EQ (-1000 , veloxConfig4.sessionStartTimeMs ());
564+
565+ // Test with maximum value
566+ session.startTime = std::numeric_limits<int64_t >::max ();
567+ auto veloxConfig5 = toVeloxConfigs (session);
568+
569+ EXPECT_EQ (
570+ std::numeric_limits<int64_t >::max (), veloxConfig5.sessionStartTimeMs ());
571+ }
0 commit comments