~hrbrmstr/sergeant-caffeinated

ref: 22ce18033163abda020c1704bfab42acd4eab5d3 sergeant-caffeinated/inst/tinytest/test_sergeant.caffeinated.R -rw-r--r-- 481 bytes
22ce1803hrbrmstr {dbplyr} 2.0.0 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
library(sergeant.caffeinated)

test_host <- Sys.getenv("DRILL_TEST_HOST", "localhost")

be_quiet()

db <- dbConnect(drv = DrillJDBC(), sprintf("jdbc:drill:zk=%s", test_host))

dbCanConnect(drv = DrillJDBC(), sprintf("jdbc:drill:zk=%s", test_host))

dbExecute(db, "ALTER SESSION SET planner.cpu_load_average = 0.8")

test_dplyr <- tbl(db, "cp.`employee.json`")

expect_equal(inherits(test_dplyr, "tbl"), TRUE)

expect_equal(inherits(dplyr::count(test_dplyr, gender), "tbl"), TRUE)