修复跨区间缓存串数据与会话回收泄漏,收敛网关重试
CI / test (push) Successful in 29s

This commit is contained in:
2026-07-17 12:19:21 +08:00
parent 7019d4c5a6
commit 882eeade1e
6 changed files with 121 additions and 68 deletions
+7
View File
@@ -49,6 +49,13 @@ func TestCachedClientHitAndIsolation(t *testing.T) {
if inner.instCalls != 3 {
t.Errorf("跨租户/区域回源 %d 次, want 3", inner.instCalls)
}
// 同租户不同 compartment 各自回源,不得共用缓存
inCompartment := testCred("t1")
inCompartment.CompartmentID = "ocid1.compartment.a"
_, _ = c.ListInstances(ctx, inCompartment, "r1")
if inner.instCalls != 4 {
t.Errorf("跨 compartment 回源 %d 次, want 4", inner.instCalls)
}
}
func TestCachedClientWriteBusts(t *testing.T) {