Copilot commented on code in PR #63286:
URL: https://github.com/apache/doris/pull/63286#discussion_r3246438135


##########
cloud/test/recycler_test.cpp:
##########
@@ -8693,4 +8693,76 @@ TEST(RecyclerTest, 
recycle_tablet_with_delete_file_failure) {
         EXPECT_EQ(it->size(), 0) << "All recycle rowset keys should be 
deleted";
     }
 }
+TEST(RecyclerTest, enable_recycler_default_true) {
+    EXPECT_TRUE(config::enable_recycler);
+}
+
+TEST(RecyclerTest, enable_recycler_skip_instance_scanner) {
+    auto txn_kv = std::make_shared<MemTxnKv>();
+    ASSERT_EQ(txn_kv->init(), 0);
+
+    bool old_val = config::enable_recycler;
+    config::enable_recycler = false;
+    DORIS_CLOUD_DEFER { config::enable_recycler = old_val; };
+
+    bool old_recycle_interval = config::recycle_interval_seconds;

Review Comment:
   `recycle_interval_seconds` is an `int64_t` config, but this saves it into a 
`bool`. If the original value is the default `3600`, the deferred restore 
writes back `1`, which can contaminate later tests that rely on the configured 
recycle interval. Store the old value as `int64_t` before setting it to zero.
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to