r-lib / pingr

ICMP and TCP ping and related tools
http://r-lib.github.io/pingr/
Other
34 stars 8 forks source link

Test failure with dev testthat #5

Closed hadley closed 4 years ago

hadley commented 8 years ago

I see

checking tests ... ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  1. Error: We can ping localhost ------------------------------------------------
  LENGTH or similar applied to closure object
  1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"))
  2: eval(code, new_test_environment)
  3: eval(expr, envir, enclos)
  4: ping_port("127.0.0.1", port = tools:::httpdPort, count = 1) at test-tcp.r:13

  testthat results ================================================================
  OK: 15 SKIPPED: 0 FAILED: 1
  1. Error: We can ping localhost 

  Error: testthat unit tests failed
  Execution halted
hadley commented 8 years ago

Bump

gaborcsardi commented 8 years ago

Thanks! Tests are not run on cran, so this is not that urgent. On 13 Oct 2015 21:47, "Hadley Wickham" notifications@github.com wrote:

Bump

— Reply to this email directly or view it on GitHub https://github.com/gaborcsardi/pingr/issues/5#issuecomment-147848110.

hadley commented 8 years ago

Hmmm, then they shouldn't be via revdep_check() either. How are you testing for CRANness?

gaborcsardi commented 8 years ago

https://github.com/cran/pingr/blob/master/tests/testthat.R#L4

Isn't this good?

hadley commented 8 years ago

It'd be better to do what skip_on_cran() does: identical(Sys.getenv("NOT_CRAN"), "true") (or you could now use skip_on_cran() directly)

gaborcsardi commented 8 years ago

Yeah, identical is better, but my code should still work I guess....

skip_on_cran is not the best here, because I want to skip all tests. All of them require the machine to be online, and CRAN sometimes loses the network connection, and then they email me....

gaborcsardi commented 4 years ago

This seems to be gone now.