This is an automated email from the ASF dual-hosted git repository.

smallzhongfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new cf6d2bff5 [#1569] fix(rust): flaky test for test_ticket_manager (#1570)
cf6d2bff5 is described below

commit cf6d2bff5d97f0977aaa4828d53c497d4abfeda7
Author: Junfan Zhang <[email protected]>
AuthorDate: Fri Mar 8 17:34:02 2024 +0800

    [#1569] fix(rust): flaky test for test_ticket_manager (#1570)
    
    What changes were proposed in this pull request?
    Use i64 to fix overflow rather than u64
    
    Why are the changes needed?
    Fix: #1569. to fix test_ticket_manager
    
    Does this PR introduce any user-facing change?
    No.
    
    How was this patch tested?
    Existing uts
---
 rust/experimental/server/src/store/mem/ticket.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/experimental/server/src/store/mem/ticket.rs 
b/rust/experimental/server/src/store/mem/ticket.rs
index eaad3796e..0f69d1535 100644
--- a/rust/experimental/server/src/store/mem/ticket.rs
+++ b/rust/experimental/server/src/store/mem/ticket.rs
@@ -47,7 +47,7 @@ impl Ticket {
     }
 
     pub fn is_timeout(&self, timeout_sec: i64) -> bool {
-        crate::util::current_timestamp_sec() - self.created_time > timeout_sec 
as u64
+        (crate::util::current_timestamp_sec() - self.created_time) as i64 > 
timeout_sec
     }
 
     pub fn get_id(&self) -> i64 {

Reply via email to