test: G14/open 旧口径测试按 P1 口径更新
- test_system_quota_exempt_server → test_system_quota_not_exempt_server:system 按普通属主算,quota 0 时照常拦(402)。 - test_system_task_exempt_from_quota → test_system_task_not_exempt_from_quota:system quota 0 时认领门拦,标 interrupted。 - test_poll_quota_lookup_failure_open → test_poll_quota_lookup_failure_open_returns_check_failed:open 异常时回 quota_check_failed(边界拒绝、轮询经 _quota_hit 过滤只警告),closed 回 quota_check_unavailable。
This commit is contained in:
1 parent
e31fcc6cba
commit
9f49b97cd3
2 files changed
+26
-12
No files matched your search
@@ -375,7 +375,10 @@ class ServerQuotasTestCase(unittest.TestCase):
|
||||
self.assertEqual(n, 0)
|
||||
|
||||
# -- G13:system 豁免(server 侧) -----------------------------------
|
||||
def test_system_quota_exempt_server(self):
|
||||
def test_system_quota_not_exempt_server(self):
|
||||
# P1 口径:system 按普通属主算,不豁免(G14 的 system 豁免
|
||||
# 与 P1 冲突,rebase 时未合入)。quota 0、used 0 时
|
||||
# used >= quota,照常拦。
|
||||
conn = sqlite3.connect(self.db_path)
|
||||
try:
|
||||
conn.execute(
|
||||
@@ -386,8 +389,9 @@ class ServerQuotasTestCase(unittest.TestCase):
|
||||
conn.close()
|
||||
handler = object.__new__(CloudControlPlaneHandler)
|
||||
handler.server = SimpleNamespace(db_path=self.db_path)
|
||||
self.assertIsNone(handler._check_quota("system"))
|
||||
self.assertFalse(handler._reject_if_over_quota("system"))
|
||||
handler._send_json = lambda *args, **kwargs: None
|
||||
self.assertIsNotNone(handler._check_quota("system"))
|
||||
self.assertTrue(handler._reject_if_over_quota("system"))
|
||||
|
||||
# -- G13/G14:/pr 按请求人过配额门、队列记归属人 ----------------------
|
||||
def _merged_remote_task(self):
|
||||
|
||||
Reference in new issue
Block a user