Skip to content

Flaky launchRemoteUnexpectedExit tests #484

@cwalther

Description

@cwalther

I find that, when I run tests locally, the two tests

launch remote unexpected session exit/remote/sends error response and terminates GDB server if incorrect GDB CLI arg
launch remote unexpected session exit/remote/sends error response if incorrect GDB server CLI arg

from src/integration-tests/launchRemoteUnexpectedExit.spec.ts occasionally fail in their final assert, about 1 in 10 to 1 in 3 times. They do not find the expected output because stdOutput is [] at the time. The reason seems to be that the { category: 'server', output: 'gdbserver exited with code 1\n' } event that is awaited with outputPromise comes before any { category: 'stdout' … events whose contents are collected, so the check is done too early. Apparently there is no deterministic order between these events.

I am not sure whether that in itself is a bug or whether that is just an unreliable way of setting up the test, and what a better way would be, so I have not come up with a solution yet. I would prefer not putting more effort into it right now, rather I am hoping @jreineckearm who wrote most of this has a better idea of how it is supposed to work.

Also, these two tests are identical. I suspect that is a copy-paste error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions