Background
While working on #1739, several weaknesses in the current R/session tests became apparent.
For example:
- the bundled
tinytest suite was not run in CI;
- some existing tests had already become stale;
- session E2E tests rely heavily on
Terminal.sendText() plus fixed sleeps/timeouts;
- failures in R evaluation, callbacks, IPC, and VS Code handling often all appear as the same timeout;
- tinytests do not reproduce vscode-R's actual R startup path through
R_PROFILE_USER;
- some transport tests use pipe primitives that do not exactly match production Unix sockets / Windows named pipes.
Proposal
Modernize the tests incrementally, roughly separating them into:
- R-level tests — runtime lifecycle, hooks, options, Data Viewer state, cleanup.
- sess transport tests — real socket/named-pipe request/response, disconnect and reconnect behavior.
- interactive R E2E — launch a real R session and deterministically observe startup, command completion, task callbacks, and prompt return.
- VS Code E2E — keep a smaller set of tests for terminal creation, workspace updates, plots,
View(), etc.
In particular, we should reduce sendText() + sleep + waitFor() style synchronization and make failures identify which layer actually failed.
This does not need to be a large rewrite. The goal is to improve the suite incrementally so it is more deterministic, closer to real usage, and easier to debug and extend.
Background
While working on #1739, several weaknesses in the current R/session tests became apparent.
For example:
tinytestsuite was not run in CI;Terminal.sendText()plus fixed sleeps/timeouts;R_PROFILE_USER;Proposal
Modernize the tests incrementally, roughly separating them into:
View(), etc.In particular, we should reduce
sendText() + sleep + waitFor()style synchronization and make failures identify which layer actually failed.This does not need to be a large rewrite. The goal is to improve the suite incrementally so it is more deterministic, closer to real usage, and easier to debug and extend.