fix: gc was being stupid allowing another thread to take the space it made before it could not anymore
All checks were successful
PR Check / check-and-test (pull_request) Successful in 12s

This commit is contained in:
2025-07-13 07:50:22 -05:00
parent 7f744d04b0
commit 3427b8f5bc
6 changed files with 68 additions and 79 deletions

View File

@@ -13,7 +13,7 @@ func TestCaching(t *testing.T) {
os.WriteFile(filepath.Join(td, "key2"), []byte("value2"), 0644)
sc := New("localhost:8080", "1G", 10, "1G", 100, td, "")
sc := New("localhost:8080", "1G", "1G", td, "")
w, err := sc.vfs.Create("key", 5)
if err != nil {
@@ -84,7 +84,7 @@ func TestCaching(t *testing.T) {
}
func TestCacheMissAndHit(t *testing.T) {
sc := New("localhost:8080", "0", 0, "1G", 100, t.TempDir(), "")
sc := New("localhost:8080", "0", "1G", t.TempDir(), "")
key := "testkey"
value := []byte("testvalue")