torwig commented on PR #1342:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1342#issuecomment-1480684889

   @PragmaTwice Hi, I'm trying to add a few unit tests, and the following one 
is failing:
   
   ```
   TEST(Metadata, MetadataDecodingBackwardCompatibleSimpleKey) {
     auto expire_at = Util::GetTimeStamp() + 10;
     Metadata md_old(kRedisString, true, false);
     EXPECT_FALSE(md_old.Is64BitEncoded());
     md_old.expire = expire_at;
     std::string encoded_bytes;
     md_old.Encode(&encoded_bytes);
   
     Metadata md_new(kRedisNone, false, true); // decoding existing metadata 
with 64-bit feature activated
     md_new.Decode(encoded_bytes);
     EXPECT_FALSE(md_new.Is64BitEncoded());
     EXPECT_EQ(md_new.Type(), kRedisString);
     EXPECT_EQ(md_new.expire, expire_at*1000);
   }
   ```
   
   With the following error:
   
   ```
   Expected equality of these values:
     md_new.expire
       Which is: 1679553000
     expire_at*1000
       Which is: 1679553143000
   
   ```
   
   I'm just wondering is there an error in logic or if my test is somehow 
incorrect (typo/misunderstanding/etc.) :)
   Could you please have a look at it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to