Add deterministic client integration diagnostics
This commit is contained in:
parent
eb9355b003
commit
fb0df5e4a1
15 changed files with 6193 additions and 18 deletions
|
|
@ -34,6 +34,10 @@ from docforge.viewer_manager import ViewerManagerClient
|
|||
ROOT = Path(__file__).resolve().parents[1]
|
||||
FIXTURES = ROOT / "tests" / "fixtures"
|
||||
RESULT_SCHEMA = json.loads((ROOT / "schemas" / "result.schema.json").read_text())
|
||||
CLIENT_CONFIGURATION_SCHEMA = json.loads(
|
||||
(ROOT / "schemas" / "client-configuration.schema.json").read_text()
|
||||
)
|
||||
DOCTOR_RESULT_SCHEMA = json.loads((ROOT / "schemas" / "doctor-result.schema.json").read_text())
|
||||
ZERO_WORK_COUNTERS = (
|
||||
"project_loads",
|
||||
"source_files_parsed",
|
||||
|
|
@ -134,6 +138,16 @@ class TelemetryContractTests(unittest.TestCase):
|
|||
set(COUNTER_NAMES),
|
||||
set(properties["counters"]["properties"]),
|
||||
)
|
||||
for schema in (CLIENT_CONFIGURATION_SCHEMA, DOCTOR_RESULT_SCHEMA):
|
||||
dedicated = schema["$defs"]["diagnostics"]["properties"]
|
||||
self.assertEqual(
|
||||
set(STAGE_NAMES),
|
||||
set(dedicated["stages"]["propertyNames"]["enum"]),
|
||||
)
|
||||
self.assertEqual(
|
||||
set(COUNTER_NAMES),
|
||||
set(dedicated["counters"]["required"]),
|
||||
)
|
||||
|
||||
def test_thread_and_async_request_contexts_are_isolated(self) -> None:
|
||||
barrier = threading.Barrier(2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue