rstudio / bslib

Tools for theming Shiny and R Markdown via Bootstrap 3, 4, or 5.
https://rstudio.github.io/bslib/
Other
443 stars 50 forks source link

fix(test-rmd-skeletons): Fix flaky render Rmd skeleton test #1001

Closed gadenbuie closed 4 months ago

gadenbuie commented 4 months ago

Fix #1000 -- don't run flaky tests on CRAN, I guess?

gadenbuie commented 4 months ago

I give up. The test is flaky in the sense that it only happens sometimes and isn't even consistent to an R version -- it mostly happens with R-devel but I've seen failures for 3.6.3 and 4.1. Given that we're using expect_no_error() around the rmarkdown::render() call, I also haven't found a good way to surface the actual error that happens at the pandoc level.

The pandoc document conversion failed with error 1 phrase does indicate that a PandocIOError occurred. That indicates that a file isn't found or that there's an issue reading from the disk such as a the disk is full. I played with moving around the expectations in this thread thinking there could be some kind of race condition where the temporary files are deleted too early (idk, I'm guessing), but that didn't help.

Anyway, I give up. This test doesn't need to run on CRAN anyway.

cpsievert commented 4 months ago

TIL that rmarkdown doesn't run tests on CRAN because of pandoc issues/flakiness 😞

https://github.com/rstudio/rmarkdown/blob/ee69d59f8011ad7b717a409fcbf8060d6ffc4139/tests/testthat.R#L2 https://github.com/rstudio/rmarkdown/commit/6f4fbd54294d14544e9d495df20acd38b351db8f