mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-25 01:45:23 +08:00
test(platform): follow the batched execution trace pipeline
The execution trace rewrite batches records and uploads them from ExecutionCounters.flush(), replaced the per-trace direct send, dropped the window counters, made the execution id the record identity and records the inbound event stage after the routing stage. The ingress tests still asserted the old mechanism, so they failed on every Python version. Assert what the pipeline now emits instead: flush the buffered records and read them back, require the trace registry to be empty afterwards, assert the deterministic execution id, expect the route stage before the inbound stage, and give the dispatch stubs the execution_id parameter the ingress passes.
This commit is contained in:
@@ -33,14 +33,14 @@ async def test_slow_failed_and_duplicate_subscriptions_do_not_block_primary_rout
|
||||
started = []
|
||||
release = asyncio.Event()
|
||||
|
||||
async def subscriber(event, adapter, uuid):
|
||||
async def subscriber(event, adapter, uuid, execution_id=None):
|
||||
started.append(uuid)
|
||||
if uuid == 'slow':
|
||||
await release.wait()
|
||||
if uuid == 'failed':
|
||||
raise ValueError('plugin error')
|
||||
|
||||
async def primary(event, adapter):
|
||||
async def primary(event, adapter, execution_id=None):
|
||||
started.append('primary')
|
||||
|
||||
bot._dispatch_plugin_subscription = subscriber
|
||||
|
||||
Reference in New Issue
Block a user