Skip to content

Commit c2fdcb4

Browse files
committed
Fix tests for MacOS
1 parent 7c73c3f commit c2fdcb4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/testthat/helper-sync.R

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ sync_req <- function(name = "default", .env = parent.frame()) {
1717
ctx <- nanonext::.context(sock)
1818
saio <- nanonext::send_aio(ctx, 0L, mode = 2L)
1919
expr
20-
r <- nanonext::recv_aio(ctx, mode = 8L, timeout = timeout)[]
21-
nanonext::is_error_value(r) && stop("req sync: ", nanonext::nng_error(r))
20+
nanonext::recv_aio(ctx, mode = 8L, timeout = timeout)[]
2221
}
2322

2423
}
@@ -37,8 +36,7 @@ sync_rep <- function(name = "default", .env = parent.frame()) {
3736
connected <<- TRUE
3837
}
3938
ctx <- nanonext::.context(sock)
40-
r <- nanonext::recv_aio(ctx, mode = 8L, timeout = timeout)[]
41-
nanonext::is_error_value(r) && stop("resp sync: ", nanonext::nng_error(r))
39+
nanonext::recv_aio(ctx, mode = 8L, timeout = timeout)[]
4240
expr
4341
nanonext::send(ctx, 0L, mode = 2L, block = TRUE)
4442
}

tests/testthat/test-resp-stream.R

+4-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ test_that("handles line endings of multiple kinds", {
9898
res$send_chunk("half line/")
9999
res$send_chunk("other half\n")
100100
})
101-
sync(res$send_chunk("broken crlf\r"))
102-
sync(res$send_chunk("\nanother line\n"))
101+
sync({
102+
res$send_chunk("broken crlf\r")
103+
res$send_chunk("\nanother line\n")
104+
})
103105
sync(res$send_chunk("eof without line ending"))
104106
})
105107

0 commit comments

Comments
 (0)