api tests: the test of every Dot's channels removes the channels it added

It added two channels and left them running for the rest of the file and its teardown, the only channels there; on
one Windows run that teardown did not finish in 60 s (not reproduced in twelve runs under load here). A test stops
what it starts: the two channels are removed at its end, and the teardown is what it was before they came.
This commit is contained in:
feder-cr committed 2026-10-12 00:01:03 +02:00
1 parent 361b770285
commit fc470314f2
1 file changed
+4
+4
View File
@@ -579,6 +579,10 @@ describe.each(testAdapters())("control-plane API (%s)", (kind) => {
[b.id, "telegram"],
]);
expect(JSON.stringify(every)).not.toMatch(/token/i);
// The channels run until they are removed: this test stops what it started, so no later test or teardown inherits them.
await channels.remove(a.id, "telegram");
await channels.remove(b.id, "telegram");
expect((await api.everyChannel()).filter((c) => c.dot_id === a.id || c.dot_id === b.id)).toEqual([]);
});
it("messages: the newest page of a long conversation, and a cursor that goes back through the rest", async () => {