Skip to content

[Bug]: memory leak on shinytest2 failures #1500

Description

@averissimo

What happened?

app_driver$stop() is never reached if the shinytest2 App Driver breaks before the end of the test.
The result is that the R process is never terminated.

See screenshot below of process monitor showing 12 instances of R process

Image

We need to ensure that app_driver$stop() is called regardless of the result of the test.

This can be done by using withr::defer(app_driver$stop()) after app_driver is created.

To verify: what happens if the initial app fails? (does shinytest2 clean the test or do we need to extend TealAppDriver

sessionInfo()

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcore

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions