Fix compact thresholds in tests to demonstrate what we need
This commit is contained in:
parent
b9dce3ddfc
commit
34c619ef41
|
@ -40,7 +40,17 @@ class TestYamaCompact(TestCase):
|
||||||
len(old_bloblog_ids), 1, "Should be many bloblogs at this point"
|
len(old_bloblog_ids), 1, "Should be many bloblogs at this point"
|
||||||
)
|
)
|
||||||
|
|
||||||
subprocess.check_call(("yama", "compact", "--mergeable", "2"), cwd=yama_path)
|
subprocess.check_call(
|
||||||
|
(
|
||||||
|
"yama",
|
||||||
|
"compact",
|
||||||
|
"--mergeable",
|
||||||
|
"2",
|
||||||
|
"--small",
|
||||||
|
str(2 * 1024 * 1024 * 1024),
|
||||||
|
),
|
||||||
|
cwd=yama_path,
|
||||||
|
)
|
||||||
|
|
||||||
new_bloblog_ids = list_bloblog_ids(yama_path)
|
new_bloblog_ids = list_bloblog_ids(yama_path)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
@ -85,9 +95,21 @@ class TestYamaCompact(TestCase):
|
||||||
old_bloblog_ids = list_bloblog_ids(yama_path)
|
old_bloblog_ids = list_bloblog_ids(yama_path)
|
||||||
|
|
||||||
# Try a GC and check that it's a no-op
|
# Try a GC and check that it's a no-op
|
||||||
subprocess.check_call(("yama", "check", "--shallow", "--gc"), cwd=yama_path)
|
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
("yama", "compact", "--mergeable", "2000", "--reclaim", "1"), cwd=yama_path
|
("yama", "check", "--shallow", "--apply-gc"), cwd=yama_path
|
||||||
|
)
|
||||||
|
subprocess.check_call(
|
||||||
|
(
|
||||||
|
"yama",
|
||||||
|
"compact",
|
||||||
|
"--mergeable",
|
||||||
|
"2000",
|
||||||
|
"--reclaim",
|
||||||
|
"1",
|
||||||
|
"--max-dealloc",
|
||||||
|
"1",
|
||||||
|
),
|
||||||
|
cwd=yama_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
unchanged_bloblog_ids = list_bloblog_ids(yama_path)
|
unchanged_bloblog_ids = list_bloblog_ids(yama_path)
|
||||||
|
@ -102,9 +124,21 @@ class TestYamaCompact(TestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Try a GC and check that it did something
|
# Try a GC and check that it did something
|
||||||
subprocess.check_call(("yama", "check", "--shallow", "--gc"), cwd=yama_path)
|
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
("yama", "compact", "--mergeable", "2000", "--reclaim", "1"), cwd=yama_path
|
("yama", "check", "--shallow", "--apply-gc"), cwd=yama_path
|
||||||
|
)
|
||||||
|
subprocess.check_call(
|
||||||
|
(
|
||||||
|
"yama",
|
||||||
|
"compact",
|
||||||
|
"--mergeable",
|
||||||
|
"2000",
|
||||||
|
"--reclaim",
|
||||||
|
"1",
|
||||||
|
"--max-dealloc",
|
||||||
|
"1",
|
||||||
|
),
|
||||||
|
cwd=yama_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
new_bloblog_ids = list_bloblog_ids(yama_path)
|
new_bloblog_ids = list_bloblog_ids(yama_path)
|
||||||
|
|
Loading…
Reference in New Issue