Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to test if the app is running #1785

Closed
wants to merge 4 commits into from

Conversation

klmr
Copy link

@klmr klmr commented Jul 7, 2017

Some time ago I asked how to test whether Shiny is running. I found a preliminary solution but there are cases where it breaks. The solution is also generally quite hacky and brittle.

I noticed that adding this functionality to Shiny should be trivial; the actual implementation is a single line of code that just inspects .global$running. I therefore hope that this PR is straightforward.


I didn’t add a unit test since it feels that an integration test would be more appropriate, and I couldn’t find any other unit tests for runtime Shiny behaviour in the code base. I did run devtools::check() to verify that the change didn’t break anything obvious. I also added documentation, filled the NEWS.md, and signed the contributor agreement.

wch added a commit that referenced this pull request Jul 11, 2017
Squashed commit of the following:

commit 8667bed8962069a5cab8691f981e2b7ba9d449c3
Author: Winston Chang <winston@stdout.org>
Date:   Tue Jul 11 14:36:11 2017 -0500

    Edits

commit c4e8549
Author: Konrad Rudolph <konrad.rudolph@gmail.com>
Date:   Fri Jul 7 17:57:33 2017 +0100

    Describe changes

commit 7b05c2e
Author: Konrad Rudolph <konrad.rudolph@gmail.com>
Date:   Fri Jul 7 17:54:40 2017 +0100

    Add new function to doc index

commit eb93ebf
Author: Konrad Rudolph <konrad.rudolph@gmail.com>
Date:   Fri Jul 7 17:54:30 2017 +0100

    Add documentatio for new function

commit 1a6c8a4
Author: Konrad Rudolph <konrad.rudolph@gmail.com>
Date:   Fri Jul 7 17:53:13 2017 +0100

    Add a function to test whether the app is running
@wch
Copy link
Collaborator

wch commented Jul 11, 2017

Thanks! I made some edits and squash-merged in 4cb428b.

@wch wch closed this Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants