Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # Copyright (c) 2015-present, Facebook, Inc.
  > # All rights reserved.
  > #
  > # This source code is licensed under the BSD-style license found in the
  > # LICENSE file in the root directory of this source tree. An additional grant
  > # of patent rights can be found in the PATENTS file in the same directory.
  > 
  > library("testthat")
  > library("DBI")
  > library("RPresto")
  > 
  > test_check("RPresto")
  -- 1. Error: PrestoCursor methods work correctly with POST data (@test-PrestoCur
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: mock_httr_response(url = "http://localhost:8000/v1/statement", status_code = 200, 
         state = "FINISHED", data = data.frame(x = 1)) at testthat/test-PrestoCursor.R:85
  2: data.to.list(data)
  3: lapply(data, function(l) {
         drv <- RPresto::Presto()
         if (is.list(l)) {
             rs.class <- data.class(l[[1]])
             if (rs.class == "raw") {
                 rv <- "varbinary"
             }
             else if (rs.class == "list") {
                 rv <- ifelse(is.null(names(l[[1]])), "array", "map")
             }
             else {
                 stop("Unsupported mock data type: ", rs.class)
             }
         }
         else {
             rv <- dbDataType(RPresto::Presto(), l)
         }
         return(rv)
     })
  4: FUN(X[[i]], ...)
  5: dbDataType(RPresto::Presto(), l)
  6: dbDataType(RPresto::Presto(), l)
  7: stringi::stri_trans_toupper
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  -- 2. Error: presto simple types are correct (@test-dbDataType.R#14)  ----------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(dbDataType(drv, NULL), "VARCHAR") at testthat/test-dbDataType.R:14
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: dbDataType(drv, NULL)
  5: dbDataType(drv, NULL)
  6: stringi::stri_trans_toupper
  7: getExportedValue(pkg, name)
  8: asNamespace(ns)
  9: getNamespace(ns)
  10: tryCatch(loadNamespace(name), error = function(e) stop(e))
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  13: value[[3L]](cond)
  
  -- 3. Error: conversion to array is correct (@test-dbDataType.R#40)  -----------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(dbDataType(drv, list()), "ARRAY<VARCHAR>") at testthat/test-dbDataType.R:40
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: dbDataType(drv, list())
  5: dbDataType(drv, list())
  6: .dbDataType(dbObj, NULL)
  7: stringi::stri_trans_toupper
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  -- 4. Error: conversion to map is correct (@test-dbDataType.R#64)  -------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(dbDataType(drv, l), "MAP<VARCHAR, VARCHAR>") at testthat/test-dbDataType.R:64
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: dbDataType(drv, l)
  5: dbDataType(drv, l)
  6: .dbDataType(dbObj, NULL)
  7: stringi::stri_trans_toupper
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  -- 5. Error: dbExistsTable works with mock (@test-dbExistsTable.R#19)  ---------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SHOW TABLES LIKE '_non_existent_table_'", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SHOW TABLES LIKE 'existing_table'", 
         next_uri = "http://localhost:8000/query_2/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(Table = "", stringsAsFactors = FALSE)[FALSE, 
             ], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, data = data.frame(Table = "existing_table", stringsAsFactors = FALSE), 
         state = "FINISHED")), {
         expect_false(dbExistsTable(conn, "_non_existent_table_"))
         expect_true(dbExistsTable(conn, "existing_table"))
     }) at testthat/test-dbExistsTable.R:19
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(Table = "", stringsAsFactors = FALSE)[FALSE, ], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, data = data.frame(Table = "existing_table", 
             stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, data = data.frame(Table = "existing_table", 
         stringsAsFactors = FALSE), state = "FINISHED")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 6. Error: dbFetch works with mock (@test-dbFetch.R#37)  ---------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "^SELECT n FROM \\(VALUES \\(1\\), \\(2\\)\\) AS t \\(n\\)$", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "RUNNING", request_body = "SELECT 2", next_uri = "http://localhost:8000/query_2/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "RUNNING", 
             request_body = "SELECT 3", next_uri = "http://localhost:8000/query_3/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "FINISHED", 
             request_body = "SELECT 4 LIMIT 0", next_uri = "http://localhost:8000/query_4/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
             next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
             status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED"), 
             mock_httr_response("http://localhost:8000/query_2/1", status_code = 400, 
                 data = "Broken URL", state = "FAILED"), mock_httr_response("http://localhost:8000/query_3/1", 
                 status_code = 200, data = "Failed URL", state = "FAILED"), mock_httr_response("http://localhost:8000/query_4/1", 
                 status_code = 200, data = data.frame(`_col0` = 4)[FALSE, , drop = FALSE], 
                 state = "FINISHED")), `httr::DELETE` = mock_httr_replies(mock_httr_response(url = "http://localhost:8000/query_1/2", 
             status_code = 200, state = "")), `httr::handle_reset` = function(...) return(), 
         {
             result <- dbSendQuery(conn, "SELECT n FROM (VALUES (1), (2)) AS t (n)")
             expect_error(dbFetch(result, 1), ".*fetching custom number of rows.*is not supported.*")
             expect_equal(dbFetch(result), data.frame(n = 1L))
             expect_true(dbClearResult(result))
             expect_error(dbFetch(result), ".*Result object is not valid.*")
             result <- dbSendQuery(conn, "SELECT n FROM (VALUES (1), (2)) AS t (n)")
             expect_equal(dbGetRowCount(result), 0)
             expect_equal(dbFetch(result), data.frame(n = 1L))
             expect_equal(dbGetRowCount(result), 1)
             expect_equal(dbFetch(result), data.frame(n = 2L))
             expect_equal(dbGetRowCount(result), 2)
             expect_true(dbHasCompleted(result))
             result <- dbSendQuery(conn, "SELECT n FROM (VALUES (1), (2)) AS t (n)")
             expect_equal(dbFetch(result, -1), data.frame(n = c(1L, 2L)))
             expect_equal(dbGetRowCount(result), 2)
             result <- dbSendQuery(conn, "SELECT 2")
             expect_error(dbFetch(result), paste0("Cannot fetch .*, error: ", "There was a problem with the request and we have exhausted ", 
                 "our retry limit"))
             result <- dbSendQuery(conn, "SELECT 3")
             expect_error(dbFetch(result), ".*Query .*localhost.8000.query.3.1 failed.*")
             result <- dbSendQuery(conn, "SELECT 4 LIMIT 0")
             rv <- dbFetch(result, -1)
             ev <- data.frame(`_col0` = 1L)[FALSE, , drop = FALSE]
             expect_equal_data_frame(rv, ev)
         }) at testthat/test-dbFetch.R:37
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/1", 
             status_code = 400, data = "Broken URL", state = "FAILED"), mock_httr_response("http://localhost:8000/query_3/1", 
             status_code = 200, data = "Failed URL", state = "FAILED"), mock_httr_response("http://localhost:8000/query_4/1", 
             status_code = 200, data = data.frame(`_col0` = 4)[FALSE, , drop = FALSE], 
             state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 7. Error: dbFetch rbind works correctly (@test-dbFetch.R#215)  --------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT \\* FROM all_types", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, next_uri = "http://localhost:8000/query_1/2", data = data.frame.with.all.classes(1), 
         state = "FINISHED"), mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, 
         data = data.frame.with.all.classes(2), state = "FINISHED")), {
         result <- dbSendQuery(conn, "SELECT * FROM all_types")
         expect_equal_data_frame(dbFetch(result, -1), data.frame.with.all.classes())
     }) at testthat/test-dbFetch.R:215
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         next_uri = "http://localhost:8000/query_1/2", data = data.frame.with.all.classes(1), 
         state = "FINISHED"), mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, 
         data = data.frame.with.all.classes(2), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, next_uri = "http://localhost:8000/query_1/2", 
         data = data.frame.with.all.classes(1), state = "FINISHED")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 8. Error: dbFetch rbind works with zero row chunks (@test-dbFetch.R#264)  ---
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT integer, double, logical FROM all_types", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PAUSED", request_body = "SELECT double FROM all_types", 
         next_uri = "http://localhost:8000/query_2/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PAUSED", request_body = "SELECT \\* FROM all_types", 
         next_uri = "http://localhost:8000/query_3/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT \\* FROM all_types_with_queue", 
         next_uri = "http://localhost:8000/query_4/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, next_uri = "http://localhost:8000/query_1/2", data = data[1, 
             , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, next_uri = "http://localhost:8000/query_1/3", data = data[FALSE, 
             , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_1/3", 
         status_code = 200, data = data[2, , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, next_uri = "http://localhost:8000/query_2/2", data = data[1, 
             "double", drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/2", 
         status_code = 200, next_uri = "http://localhost:8000/query_2/3", data = data[FALSE, 
             "double", drop = FALSE], state = "RUNNING"), mock_httr_response("http://localhost:8000/query_2/3", 
         status_code = 200, data = data[2, "double", drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_3/1", status_code = 200, next_uri = "http://localhost:8000/query_3/2", 
             data = full.data[FALSE, , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_3/2", 
             status_code = 200, data = full.data, state = "FINISHED"), mock_httr_response("http://localhost:8000/query_4/1", 
             status_code = 200, next_uri = "http://localhost:8000/query_4/2", state = "QUEUED"), 
         mock_httr_response("http://localhost:8000/query_4/2", status_code = 200, next_uri = "http://localhost:8000/query_4/3", 
             state = "QUEUED"), mock_httr_response("http://localhost:8000/query_4/3", 
             next_uri = "http://localhost:8000/query_4/4", status_code = 200, data = full.data[1, 
                 , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_4/4", 
             status_code = 200, next_uri = "http://localhost:8000/query_4/5", state = "QUEUED"), 
         mock_httr_response("http://localhost:8000/query_4/5", next_uri = "http://localhost:8000/query_4/6", 
             status_code = 200, data = full.data[FALSE, , drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_4/6", next_uri = "http://localhost:8000/query_4/7", 
             status_code = 200, data = full.data[2, , drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_4/7", next_uri = "http://localhost:8000/query_4/8", 
             status_code = 200, data = full.data[FALSE, , drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_4/8", status_code = 200, state = "FINISHED")), 
         {
             result <- dbSendQuery(conn, "SELECT integer, double, logical FROM all_types")
             expect_equal_data_frame(dbFetch(result, -1), data, label = "multiple columns")
             result <- dbSendQuery(conn, "SELECT double FROM all_types")
             expect_equal_data_frame(dbFetch(result, -1), data[, "double", drop = FALSE], 
                 label = "single column")
             result <- dbSendQuery(conn, "SELECT * FROM all_types")
             expect_equal_data_frame(dbFetch(result, -1), full.data, label = "zero chunk first")
             result <- dbSendQuery(conn, "SELECT * FROM all_types_with_queue")
             expect_equal_data_frame(dbFetch(result, -1), full.data, label = "with empty chunks")
         }) at testthat/test-dbFetch.R:264
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         next_uri = "http://localhost:8000/query_1/2", data = data[1, , drop = FALSE], 
         state = "FINISHED"), mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, 
         next_uri = "http://localhost:8000/query_1/3", data = data[FALSE, , drop = FALSE], 
         state = "FINISHED"), mock_httr_response("http://localhost:8000/query_1/3", status_code = 200, 
         data = data[2, , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, next_uri = "http://localhost:8000/query_2/2", data = data[1, 
             "double", drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/2", 
         status_code = 200, next_uri = "http://localhost:8000/query_2/3", data = data[FALSE, 
             "double", drop = FALSE], state = "RUNNING"), mock_httr_response("http://localhost:8000/query_2/3", 
         status_code = 200, data = data[2, "double", drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_3/1", status_code = 200, next_uri = "http://localhost:8000/query_3/2", 
             data = full.data[FALSE, , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_3/2", 
             status_code = 200, data = full.data, state = "FINISHED"), mock_httr_response("http://localhost:8000/query_4/1", 
             status_code = 200, next_uri = "http://localhost:8000/query_4/2", state = "QUEUED"), 
         mock_httr_response("http://localhost:8000/query_4/2", status_code = 200, next_uri = "http://localhost:8000/query_4/3", 
             state = "QUEUED"), mock_httr_response("http://localhost:8000/query_4/3", 
             next_uri = "http://localhost:8000/query_4/4", status_code = 200, data = full.data[1, 
                 , drop = FALSE], state = "FINISHED"), mock_httr_response("http://localhost:8000/query_4/4", 
             status_code = 200, next_uri = "http://localhost:8000/query_4/5", state = "QUEUED"), 
         mock_httr_response("http://localhost:8000/query_4/5", next_uri = "http://localhost:8000/query_4/6", 
             status_code = 200, data = full.data[FALSE, , drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_4/6", next_uri = "http://localhost:8000/query_4/7", 
             status_code = 200, data = full.data[2, , drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_4/7", next_uri = "http://localhost:8000/query_4/8", 
             status_code = 200, data = full.data[FALSE, , drop = FALSE], state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_4/8", status_code = 200, state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, next_uri = "http://localhost:8000/query_1/2", 
         data = data[1, , drop = FALSE], state = "FINISHED")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 9. Error: dbGetInfo works with mock (@test-dbGetInfo.R#50)  -----------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT n FROM two_rows", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
         next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED")), 
         {
             result <- dbSendQuery(conn, "SELECT n FROM two_rows")
             expect_equal(dbGetInfo(result), list(statement = "SELECT n FROM two_rows", 
                 row.count = as.integer(0), has.completed = FALSE, stats = list(state = "QUEUED")))
             expect_equal(dbFetch(result), data.frame(n = 1))
             expect_equal(dbGetInfo(result), list(statement = "SELECT n FROM two_rows", 
                 row.count = as.integer(1), has.completed = FALSE, stats = list(state = "FINISHED")))
             expect_equal(dbFetch(result), data.frame(n = 2))
             expect_equal(dbGetInfo(result), list(statement = "SELECT n FROM two_rows", 
                 row.count = as.integer(2), has.completed = TRUE, stats = list(state = "FINISHED")))
         }) at testthat/test-dbGetInfo.R:50
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 10. Error: dbGetQuery works with mock (@test-dbGetQuery.R#45)  --------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT n FROM two_rows", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT t FROM encoding_test", 
         next_uri = "http://localhost:8000/query_2/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
         next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, data = data.frame(t = "çðýöþü", 
             stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_2/2"), 
         mock_httr_response("http://localhost:8000/query_2/2", status_code = 200, data = data.frame(t = "ÇÐÝÖÞÜ", 
             stringsAsFactors = FALSE), state = "FINISHED")), {
         expect_equal_data_frame(dbGetQuery(conn, "SELECT n FROM two_rows"), data.frame(n = c(1, 
             2)))
         expect_equal_data_frame(dbGetQuery(conn, "SELECT t FROM encoding_test"), data.frame(t = c("çðýöþü", 
             "ÇÐÝÖÞÜ"), stringsAsFactors = FALSE))
     }) at testthat/test-dbGetQuery.R:45
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/1", 
             status_code = 200, data = data.frame(t = "çðýöþü", stringsAsFactors = FALSE), 
             state = "FINISHED", next_uri = "http://localhost:8000/query_2/2"), mock_httr_response("http://localhost:8000/query_2/2", 
             status_code = 200, data = data.frame(t = "ÇÐÝÖÞÜ", stringsAsFactors = FALSE), 
             state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 11. Error: dbGetQuery works with data in POST response (@test-dbGetQuery.R#10
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT 1 AS x", data = data.frame(x = 1, 
             stringsAsFactors = FALSE)), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT n FROM two_rows", 
         data = data.frame(n = 3, stringsAsFactors = FALSE), next_uri = "http://localhost:8000/query_1/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(n = 4, stringsAsFactors = FALSE), state = "FINISHED")), 
         {
             expect_equal_data_frame(dbGetQuery(conn, "SELECT 1 AS x"), data.frame(x = 1))
             expect_equal_data_frame(dbGetQuery(conn, "SELECT n FROM two_rows"), data.frame(n = c(3, 
                 4)))
         }) at testthat/test-dbGetQuery.R:106
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, 
         state = "FINISHED", request_body = "SELECT 1 AS x", data = data.frame(x = 1, 
             stringsAsFactors = FALSE)), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT n FROM two_rows", 
         data = data.frame(n = 3, stringsAsFactors = FALSE), next_uri = "http://localhost:8000/query_1/1"))
  10: mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "FINISHED", 
         request_body = "SELECT 1 AS x", data = data.frame(x = 1, stringsAsFactors = FALSE))
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 12. Error: Inconsistent data in chunks fail (@test-dbGetQuery.R#149)  -------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PLANNING", request_body = "SELECT a, b FROM broken_chunks", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, state = "PLANNING", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, state = "RUNNING", 
             data = data.frame(a = 1, b = TRUE), next_uri = "http://localhost:8000/query_1/3"), 
         mock_httr_response("http://localhost:8000/query_1/3", status_code = 200, state = "RUNNING", 
             data = data.frame(x = 1, y = TRUE), next_uri = "http://localhost:8000/query_1/4"), 
         mock_httr_response("http://localhost:8000/query_1/4", status_code = 200, state = "FINISHED", 
             data = data.frame(a = 3, b = FALSE))), `httr::DELETE` = mock_httr_replies(mock_httr_response(url = "http://localhost:8000/query_1/4", 
         status_code = 200, state = "")), {
         expect_error(dbGetQuery(conn, "SELECT a, b FROM broken_chunks"), "Chunk column names are different across chunks")
     }) at testthat/test-dbGetQuery.R:149
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         state = "PLANNING", next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, state = "RUNNING", data = data.frame(a = 1, b = TRUE), next_uri = "http://localhost:8000/query_1/3"), 
         mock_httr_response("http://localhost:8000/query_1/3", status_code = 200, state = "RUNNING", 
             data = data.frame(x = 1, y = TRUE), next_uri = "http://localhost:8000/query_1/4"), 
         mock_httr_response("http://localhost:8000/query_1/4", status_code = 200, state = "FINISHED", 
             data = data.frame(a = 3, b = FALSE)))
  10: mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, state = "RUNNING", 
         data = data.frame(a = 1, b = TRUE), next_uri = "http://localhost:8000/query_1/3")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 13. Error: dbGetRowCount works with mock (@test-dbGetRowCount.R#28)  --------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT n FROM two_rows", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
         next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED")), 
         {
             result <- dbSendQuery(conn, "SELECT n FROM two_rows")
             expect_equal(dbGetRowCount(result), 0)
             expect_equal(dbFetch(result), data.frame(n = 1))
             expect_equal(dbGetRowCount(result), 1)
             expect_equal(dbFetch(result), data.frame(n = 2))
             expect_equal(dbGetRowCount(result), 2)
             expect_equal(dbFetch(result), data.frame())
             expect_equal(dbGetRowCount(result), 2)
         }) at testthat/test-dbGetRowCount.R:28
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 14. Error: dbGetStatement works with mock (@test-dbGetStatement.R#23)  ------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT n FROM two_rows", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
         next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED")), 
         {
             result <- dbSendQuery(conn, "SELECT n FROM two_rows")
             expect_equal(dbGetStatement(result), "SELECT n FROM two_rows")
             expect_equal(dbFetch(result, -1), data.frame(n = c(1, 2)))
             expect_equal(dbGetStatement(result), "SELECT n FROM two_rows")
             expect_equal(dbFetch(result), data.frame())
             expect_equal(dbGetStatement(result), "SELECT n FROM two_rows")
         }) at testthat/test-dbGetStatement.R:23
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 15. Error: dbHasCompleted works with mock (@test-dbHasCompleted.R#23)  ------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT n FROM two_rows", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
         next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED")), 
         {
             result <- dbSendQuery(conn, "SELECT n FROM two_rows")
             expect_false(dbHasCompleted(result))
             expect_equal(dbFetch(result), data.frame(n = 1))
             expect_false(dbHasCompleted(result))
             expect_equal(dbFetch(result), data.frame(n = 2))
             expect_true(dbHasCompleted(result))
             expect_equal(dbFetch(result), data.frame())
             expect_true(dbHasCompleted(result))
         }) at testthat/test-dbHasCompleted.R:23
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 16. Error: dbIsValid works with mock - successful queries (@test-dbIsValid.R#
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT n FROM two_rows", 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", 
         next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, data = data.frame(n = 2, stringsAsFactors = FALSE), state = "FINISHED")), 
         {
             result <- dbSendQuery(conn, "SELECT n FROM two_rows")
             expect_true(dbIsValid(result))
             expect_equal(dbFetch(result), data.frame(n = 1))
             expect_true(dbIsValid(result))
             expect_equal(dbFetch(result), data.frame(n = 2))
             expect_true(dbIsValid(result))
             expect_equal(dbFetch(result), data.frame())
             expect_true(dbIsValid(result))
         }) at testthat/test-dbIsValid.R:42
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1, stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2, 
             stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1, 
         stringsAsFactors = FALSE), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 17. Error: dbIsValid works with mock - retries and failures (@test-dbIsValid.
  Cannot fetch http://localhost:8000/query_2/1, error: There was a problem with the request and we have exhausted our retry limit for uri: http://localhost:8000/query_2/1
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "RUNNING", request_body = "SELECT 1", next_uri = "http://localhost:8000/query_1/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "RUNNING", 
             request_body = "SELECT 2 AS n", next_uri = "http://localhost:8000/query_2/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "RUNNING", 
             request_body = "SELECT \"text\" AS z", next_uri = "http://localhost:8000/query_3/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "QUEUED", 
             request_body = "SELECT x FROM respond_with_404", next_uri = "http://localhost:8000/query_4/1")), 
         `httr::GET` = function(url, ...) {
             if (url == "http://localhost:8000/query_1/1") {
                 stop("Error")
             }
             if (url == "http://localhost:8000/query_2/1") {
                 if (request.count == 0) {
                     request.count <<- 1
                     stop("First request is an error")
                 }
                 return(mock_httr_replies(mock_httr_response(url, status_code = 200, state = "FINISHED", 
                     data = data.frame(n = 2)))(url))
             }
             if (url == "http://localhost:8000/query_3/1") {
                 if (request.count == 0) {
                     request.count <<- 1
                     return(mock_httr_replies(mock_httr_response(url, status_code = 404))(url))
                 }
                 return(mock_httr_replies(mock_httr_response(url, status_code = 200, state = "FINISHED", 
                     data = data.frame(z = "text")))(url))
             }
             if (url == "http://localhost:8000/query_4/1") {
                 return(mock_httr_replies(mock_httr_response(url, status_code = 404))(url))
             }
             stop("Unhandled url in httr::GET mock: ", url)
         }, `httr::handle_reset` = function(...) return(), {
             result <- dbSendQuery(conn, "SELECT 1")
             expect_true(dbIsValid(result))
             expect_error(suppressMessages(dbFetch(result)), "There was a problem with the request")
             expect_false(dbIsValid(result))
             assign("request.count", 0, envir = environment(httr::GET))
             result <- dbSendQuery(conn, "SELECT 2 AS n")
             expect_true(dbIsValid(result))
             expect_message(v <- dbFetch(result), "First request is an error")
             expect_equal(v, data.frame(n = 2))
             expect_true(dbIsValid(result))
             expect_true(dbHasCompleted(result))
             assign("request.count", 0, envir = environment(httr::GET))
             result <- dbSendQuery(conn, "SELECT \"text\" AS z")
             expect_true(dbIsValid(result))
             expect_message(v <- dbFetch(result), "GET call failed with error: .*\\((HTTP )*404\\).*, retrying.*")
             expect_equal(v, data.frame(z = "text", stringsAsFactors = FALSE))
             expect_true(dbIsValid(result))
             expect_true(dbHasCompleted(result))
             result <- dbSendQuery(conn, "SELECT x FROM respond_with_404")
             expect_true(dbIsValid(result))
             expect_error(dbFetch(result), "There was a problem with the request")
         }) at testthat/test-dbIsValid.R:82
  2: eval(code[[length(code)]], parent.frame())
  3: eval(code[[length(code)]], parent.frame())
  4: expect_message(v <- dbFetch(result), "First request is an error")
  5: quasi_capture(enquo(object), capture_messages, label = label)
  6: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  7: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  8: eval_bare(get_expr(quo), get_env(quo))
  9: dbFetch(result)
  10: dbFetch(result)
  11: .fetch.single.uri(res, n, ...)
  12: tryCatch(.fetch.uri.with.retries(res@cursor$nextUri()), error = function(e) {
         res@cursor$state("FAILED")
         stop(simpleError(paste0("Cannot fetch ", res@cursor$nextUri(), ", ", "error: ", 
             conditionMessage(e)), call = ".fetch.single.uri"))
     })
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  -- 18. Error: dbListFields works with mock - PrestoConnection (@test-dbListField
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT \\* FROM \"two_columns\" LIMIT 0", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT \\* FROM \"__non_existent_table__\" LIMIT 0", 
         next_uri = "http://localhost:8000/query_2/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(column1 = 1, column2 = FALSE, stringsAsFactors = FALSE)[FALSE, 
             ], state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, state = "FAILED", )), `httr::DELETE` = mock_httr_replies(mock_httr_response(url = "http://localhost:8000/query_2/1", 
         status_code = 200, state = "")), {
         expect_equal(dbListFields(conn, "two_columns"), c("column1", "column2"))
         expect_error(dbListFields(conn, "__non_existent_table__"), "Query .* failed")
     }) at testthat/test-dbListFields.R:34
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(column1 = 1, column2 = FALSE, stringsAsFactors = FALSE)[FALSE, 
             ], state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, state = "FAILED", ))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(column1 = 1, 
         column2 = FALSE, stringsAsFactors = FALSE)[FALSE, ], state = "FINISHED", )
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 19. Error: dbListFields works with mock - PrestoResult (@test-dbListFields.R#
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT \\* FROM two_columns", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "^SELECT \\* FROM __non_existent_table__$", 
         next_uri = "http://localhost:8000/query_2/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = paste0("^SELECT \\* FROM \\(SELECT \\* FROM __non_existent_table__\\) ", 
             "WHERE 1 = 0$"), next_uri = "http://localhost:8000/query_4/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT \\* FROM empty_table", 
         next_uri = "http://localhost:8000/query_3/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PLANNING", request_body = "^SELECT \\* FROM three_columns$", 
         next_uri = "http://localhost:8000/query_5/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PLANNING", request_body = paste0("^SELECT \\* FROM \\(SELECT \\* FROM three_columns\\) ", 
             "WHERE 1 = 0$"), next_uri = "http://localhost:8000/query_6/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(column1 = 1, column2 = 2), state = "FINISHED", 
         ), mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, extra_content = list(error = list(message = "Table __non_existent_table__ does not exist")), 
         state = "FAILED", ), mock_httr_response("http://localhost:8000/query_3/1", status_code = 200, 
         state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_4/1", 
         status_code = 200, extra_content = list(error = list(message = "Table __non_existent_table__ does not exist")), 
         state = "FAILED", ), mock_httr_response("http://localhost:8000/query_5/1", status_code = 200, 
         next_uri = "http://localhost:8000/query_5/2", state = "PLANNING", ), mock_httr_response("http://localhost:8000/query_6/1", 
         status_code = 200, next_uri = "http://localhost:8000/query_6/2", state = "PLANNING", 
         ), mock_httr_response("http://localhost:8000/query_6/2", status_code = 200, data = data.frame(a = 1, 
         b = TRUE, c = "", stringsAsFactors = FALSE)[FALSE, , drop = FALSE], state = "FINISHED", 
         )), `httr::DELETE` = mock_httr_replies(mock_httr_response(url = "http://localhost:8000/query_3/1", 
         status_code = 200, state = ""), mock_httr_response(url = "http://localhost:8000/query_4/1", 
         status_code = 200, state = ""), mock_httr_response(url = "http://localhost:8000/query_6/2", 
         status_code = 200, state = "")), {
         result <- dbSendQuery(conn, "SELECT * FROM two_columns")
         expect_true(dbIsValid(result))
         expect_equal(dbListFields(result), c("column1", "column2"))
         result <- dbSendQuery(conn, "SELECT * FROM __non_existent_table__")
         expect_true(dbIsValid(result))
         expect_error(dbListFields(result), "Query.*failed: Table __non_existent_table__ does not exist")
         result <- dbSendQuery(conn, "SELECT * FROM empty_table")
         expect_equal(dbListFields(result), character(0))
         result <- dbSendQuery(conn, "SELECT * FROM empty_table")
         expect_true(dbClearResult(result))
         expect_error(dbListFields(result), "The result object is not valid")
         result <- dbSendQuery(conn, "SELECT * FROM three_columns")
         expect_equal(dbListFields(result), c("a", "b", "c"))
     }) at testthat/test-dbListFields.R:87
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(column1 = 1, column2 = 2), state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, extra_content = list(error = list(message = "Table __non_existent_table__ does not exist")), 
         state = "FAILED", ), mock_httr_response("http://localhost:8000/query_3/1", status_code = 200, 
         state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_4/1", 
         status_code = 200, extra_content = list(error = list(message = "Table __non_existent_table__ does not exist")), 
         state = "FAILED", ), mock_httr_response("http://localhost:8000/query_5/1", status_code = 200, 
         next_uri = "http://localhost:8000/query_5/2", state = "PLANNING", ), mock_httr_response("http://localhost:8000/query_6/1", 
         status_code = 200, next_uri = "http://localhost:8000/query_6/2", state = "PLANNING", 
         ), mock_httr_response("http://localhost:8000/query_6/2", status_code = 200, data = data.frame(a = 1, 
         b = TRUE, c = "", stringsAsFactors = FALSE)[FALSE, , drop = FALSE], state = "FINISHED", 
         ))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(column1 = 1, 
         column2 = 2), state = "FINISHED", )
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 20. Error: dbListFields works with mock - PrestoResult - POST data (@test-dbL
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "SELECT \\* FROM two_columns", 
         data = data.frame(column1 = 3, column2 = 4)), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "FINISHED", request_body = "SELECT \\* FROM two_rows", 
         data = data.frame(column1 = 5, column2 = 6), next_uri = "http://localhost:8000/query_2/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_2/1", 
             status_code = 200, data = data.frame(column1 = 7, column2 = 8), state = "FINISHED", 
             )), {
             result <- dbSendQuery(conn, "SELECT * FROM two_columns")
             expect_true(dbIsValid(result))
             expect_equal(dbListFields(result), c("column1", "column2"))
             expect_equal(dbFetch(result), data.frame(column1 = 3, column2 = 4))
             expect_true(dbHasCompleted(result))
             result <- dbSendQuery(conn, "SELECT * FROM two_rows")
             expect_true(dbIsValid(result))
             expect_equal(dbListFields(result), c("column1", "column2"))
             expect_equal(dbFetch(result), data.frame(column1 = 5, column2 = 6))
             expect_false(dbHasCompleted(result))
             expect_equal(dbFetch(result), data.frame(column1 = 7, column2 = 8))
             expect_true(dbHasCompleted(result))
         }) at testthat/test-dbListFields.R:234
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, 
         state = "QUEUED", request_body = "SELECT \\* FROM two_columns", data = data.frame(column1 = 3, 
             column2 = 4)), mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, 
         state = "FINISHED", request_body = "SELECT \\* FROM two_rows", data = data.frame(column1 = 5, 
             column2 = 6), next_uri = "http://localhost:8000/query_2/1"))
  10: mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "QUEUED", 
         request_body = "SELECT \\* FROM two_columns", data = data.frame(column1 = 3, 
             column2 = 4))
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 21. Error: dbListFields works with mock - PrestoResult - POST columns (@test-
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(list(url = "http://localhost:8000/v1/statement", 
         response = structure(list(url = "http://localhost:8000/v1/statement", status_code = 200, 
             headers = list(`content-type` = "application/json"), content = charToRaw(jsonlite::toJSON(list(stats = list(state = jsonlite::unbox("QUEUED")), 
                 id = jsonlite::unbox("http__localhost_8000_v1_statement"), nextUri = jsonlite::unbox("http://localhost:8000/query_1/1"), 
                 columns = data.to.list(data.frame(column1 = 1, column2 = 2))[["column.data"]]), 
                 dataframe = "values"))), class = "response"), request_body = "SELECT \\* FROM two_columns"), 
         list(url = "http://localhost:8000/v1/statement", response = structure(list(url = "http://localhost:8000/v1/statement", 
             status_code = 200, headers = list(`content-type` = "application/json"), content = charToRaw(jsonlite::toJSON(list(stats = list(state = jsonlite::unbox("QUEUED")), 
                 id = jsonlite::unbox("http__localhost_8000_v1_statement"), nextUri = jsonlite::unbox("http://localhost:8000/query_2/1"), 
                 columns = data.to.list(data.frame(column3 = 1, column4 = 2))[["column.data"]]), 
                 dataframe = "values"))), class = "response"), request_body = "SELECT \\* FROM other_two_columns")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(column1 = 9, column2 = 10), state = "FINISHED", 
             ), list(url = "http://localhost:8000/query_2/1", response = structure(list(url = "http://localhost:8000/query_2/1", 
             status_code = 200, headers = list(`content-type` = "application/json"), content = charToRaw(jsonlite::toJSON(list(stats = list(state = jsonlite::unbox("QUEUED")), 
                 id = jsonlite::unbox("http__localhost_8000_query_1_1"), nextUri = jsonlite::unbox("http://localhost:8000/query_2/2"), 
                 columns = data.to.list(data.frame(column3 = 1, column4 = 2))[["column.data"]]), 
                 dataframe = "values"))), class = "response")), mock_httr_response("http://localhost:8000/query_2/2", 
             status_code = 200, data = data.frame(column3 = 13, column4 = 14), state = "FINISHED", 
             )), {
             result <- dbSendQuery(conn, "SELECT * FROM two_columns")
             expect_true(dbIsValid(result))
             expect_equal(dbListFields(result), c("column1", "column2"))
             expect_equal(dbFetch(result), data.frame(column1 = 9, column2 = 10))
             expect_true(dbHasCompleted(result))
             result <- dbSendQuery(conn, "SELECT * FROM other_two_columns")
             expect_true(dbIsValid(result))
             expect_equal(dbListFields(result), c("column3", "column4"))
             expect_equal(dbFetch(result), data.frame(column3 = 1, column4 = 2)[FALSE, 
                 , drop = FALSE])
             expect_false(dbHasCompleted(result))
             expect_equal(dbFetch(result), data.frame(column3 = 13, column4 = 14))
             expect_true(dbHasCompleted(result))
         }) at testthat/test-dbListFields.R:280
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(list(url = "http://localhost:8000/v1/statement", response = structure(list(url = "http://localhost:8000/v1/statement", 
         status_code = 200, headers = list(`content-type` = "application/json"), content = charToRaw(jsonlite::toJSON(list(stats = list(state = jsonlite::unbox("QUEUED")), 
             id = jsonlite::unbox("http__localhost_8000_v1_statement"), nextUri = jsonlite::unbox("http://localhost:8000/query_1/1"), 
             columns = data.to.list(data.frame(column1 = 1, column2 = 2))[["column.data"]]), 
             dataframe = "values"))), class = "response"), request_body = "SELECT \\* FROM two_columns"), 
         list(url = "http://localhost:8000/v1/statement", response = structure(list(url = "http://localhost:8000/v1/statement", 
             status_code = 200, headers = list(`content-type` = "application/json"), content = charToRaw(jsonlite::toJSON(list(stats = list(state = jsonlite::unbox("QUEUED")), 
                 id = jsonlite::unbox("http__localhost_8000_v1_statement"), nextUri = jsonlite::unbox("http://localhost:8000/query_2/1"), 
                 columns = data.to.list(data.frame(column3 = 1, column4 = 2))[["column.data"]]), 
                 dataframe = "values"))), class = "response"), request_body = "SELECT \\* FROM other_two_columns"))
  10: structure(list(url = "http://localhost:8000/v1/statement", status_code = 200, headers = list(`content-type` = "application/json"), 
         content = charToRaw(jsonlite::toJSON(list(stats = list(state = jsonlite::unbox("QUEUED")), 
             id = jsonlite::unbox("http__localhost_8000_v1_statement"), nextUri = jsonlite::unbox("http://localhost:8000/query_1/1"), 
             columns = data.to.list(data.frame(column1 = 1, column2 = 2))[["column.data"]]), 
             dataframe = "values"))), class = "response")
  ...
  17: dbDataType(RPresto::Presto(), l)
  18: dbDataType(RPresto::Presto(), l)
  19: stringi::stri_trans_toupper
  20: getExportedValue(pkg, name)
  21: asNamespace(ns)
  22: getNamespace(ns)
  23: tryCatch(loadNamespace(name), error = function(e) stop(e))
  24: tryCatchList(expr, classes, parentenv, handlers)
  25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  26: value[[3L]](cond)
  
  -- 22. Error: dbListTables works with mock (@test-dbListTables.R#25)  ----------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "^SHOW TABLES$", next_uri = "http://localhost:8000/query_1/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "QUEUED", 
             request_body = "^SHOW TABLES LIKE '_no_table_'$", next_uri = "http://localhost:8000/query_2/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(Table = letters, stringsAsFactors = FALSE), 
             state = "FINISHED"), mock_httr_response("http://localhost:8000/query_2/1", 
             status_code = 200, data = data.frame(Table = "a", stringsAsFactors = FALSE)[FALSE, 
                 ], state = "FINISHED")), {
             expect_equal(dbListTables(conn), letters)
             expect_equal(dbListTables(conn, pattern = "_no_table_"), character(0))
         }) at testthat/test-dbListTables.R:25
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(Table = letters, stringsAsFactors = FALSE), state = "FINISHED"), 
         mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, data = data.frame(Table = "a", 
             stringsAsFactors = FALSE)[FALSE, ], state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(Table = letters, 
         stringsAsFactors = FALSE), state = "FINISHED")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 23. Error: dbSendQuery works with mock - POST data (@test-dbSendQuery.R#194) 
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, request_body = "SELECT 1 AS x", state = "RUNNING", data = data.frame(x = 1), 
         next_uri = "http://localhost:8000/query_1/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, state = "FINISHED", data = data.frame())), {
         result <- dbSendQuery(conn, "SELECT 1 AS x")
         expect_is(result, "PrestoResult")
         expect_equal(result@statement, "SELECT 1 AS x")
         expect_equal(result@cursor$fetchedRowCount(), 0)
         expect_false(result@cursor$hasCompleted())
         expect_false(result@cursor$postDataParsed())
         expect_equal_data_frame(dbFetch(result), data.frame(x = 1))
         expect_true(result@cursor$postDataParsed())
         expect_false(result@cursor$hasCompleted())
         expect_equal(result@cursor$fetchedRowCount(), 1)
         expect_equal_data_frame(dbFetch(result), data.frame())
         expect_true(result@cursor$hasCompleted())
         expect_equal(result@cursor$fetchedRowCount(), 1)
         expect_true(dbHasCompleted(result))
     }) at testthat/test-dbSendQuery.R:194
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, 
         request_body = "SELECT 1 AS x", state = "RUNNING", data = data.frame(x = 1), 
         next_uri = "http://localhost:8000/query_1/1"))
  10: mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, request_body = "SELECT 1 AS x", 
         state = "RUNNING", data = data.frame(x = 1), next_uri = "http://localhost:8000/query_1/1")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 24. Error: db_explain works with mock (@test-db_explain.R#26)  --------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "EXPLAIN SHOW TABLES", next_uri = "http://localhost:8000/query_1/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(e = "explanation", stringsAsFactors = FALSE), 
             state = "FINISHED")), {
             result <- dplyr::db_explain(s[["con"]], dplyr::sql("SHOW TABLES"))
             expect_equal(result, "explanation")
         }) at testthat/test-db_explain.R:26
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(e = "explanation", stringsAsFactors = FALSE), state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(e = "explanation", 
         stringsAsFactors = FALSE), state = "FINISHED")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 25. Error: db_query_fields works with mock (@test-db_query_fields.R#43)  ----
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "QUEUED", request_body = "^SELECT \\* FROM \\(SELECT 1 AS a, 't' AS b\\) \"a\" LIMIT 0$", 
         next_uri = "http://localhost:8000/query_1/1", info_uri = "http://localhost:8000/v1/query/query_1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "QUEUED", 
             request_body = paste0("^SELECT \\* FROM ", "\\(\\(SELECT 1 AS a, 't' AS b\\) AS \"a\"\\) ", 
                 "AS \"zzz[0-9]+\" LIMIT 0$"), next_uri = "http://localhost:8000/query_1/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "QUEUED", 
             request_body = paste0("^SELECT \\* FROM \\(", "\\(SELECT 1 AS a, 't' AS b\\) \"a\"", 
                 "\\) \"zzz[0-9]+\" WHERE 1 = 0$"), next_uri = "http://localhost:8000/query_1/1"), 
         mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, state = "QUEUED", 
             request_body = "^SELECT \\* FROM \"__non_existent_table__\" LIMIT 0$", next_uri = "http://localhost:8000/query_2/1", 
             ), mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, 
             state = "QUEUED", request_body = paste0("^SELECT \\* FROM \"__non_existent_table__\" ", 
                 "AS \"zzz[0-9]+\" WHERE 1 = 0$"), next_uri = "http://localhost:8000/query_2/1", 
             ), mock_httr_response("http://localhost:8000/v1/statement", status_code = 200, 
             state = "FINISHED", request_body = "^SELECT \\* FROM \"empty_table\" LIMIT 0$", 
             next_uri = "http://localhost:8000/query_3/1", ), mock_httr_response("http://localhost:8000/v1/statement", 
             status_code = 200, state = "FINISHED", request_body = paste0("^SELECT \\* FROM \"empty_table\" AS \"zzz[0-9]+\"", 
                 " WHERE 1 = 0$"), next_uri = "http://localhost:8000/query_3/1", ), mock_httr_response("http://localhost:8000/v1/statement", 
             status_code = 200, state = "QUEUED", request_body = "^SELECT \\* FROM \"two_columns\" LIMIT 0$", 
             next_uri = "http://localhost:8000/query_4/1", ), mock_httr_response("http://localhost:8000/v1/statement", 
             status_code = 200, state = "QUEUED", request_body = paste0("^SELECT \\* FROM \"two_columns\" AS \"zzz[0-9]+\"", 
                 " WHERE 1 = 0$"), next_uri = "http://localhost:8000/query_4/1", )), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, data = data.frame(a = 1, b = "t", stringsAsFactors = FALSE), 
         state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_2/1", 
         status_code = 200, extra_content = list(error = list(message = "Table __non_existent_table__ does not exist")), 
         state = "FAILED", ), mock_httr_response("http://localhost:8000/query_3/1", status_code = 200, 
         state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_4/1", 
         status_code = 200, data = data.frame(a = 1, b = TRUE), state = "FINISHED", )), 
         `httr::DELETE` = function(url, body, ...) {
             mock_httr_response(url = "http://localhost:8000/query_1/1", status_code = 200, 
                 state = "")[["response"]]
         }, {
             fields <- dplyr::db_query_fields(s[["con"]], dplyr::sql_subquery(s[["con"]], 
                 dplyr::sql("SELECT 1 AS a, 't' AS b"), name = "a"))
             expect_equal(fields, c("a", "b"))
             expect_equal(dplyr::db_query_fields(s[["con"]], dplyr::ident("two_columns")), 
                 c("a", "b"))
             expect_equal(dplyr::db_query_fields(s[["con"]], dplyr::ident("empty_table")), 
                 character(0))
             expect_error(dplyr::db_query_fields(s[["con"]], dplyr::ident("__non_existent_table__")), 
                 "Query.*failed:.*Table .*__non_existent_table__ does not exist")
         }) at testthat/test-db_query_fields.R:43
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(a = 1, b = "t", stringsAsFactors = FALSE), state = "FINISHED", 
         ), mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, extra_content = list(error = list(message = "Table __non_existent_table__ does not exist")), 
         state = "FAILED", ), mock_httr_response("http://localhost:8000/query_3/1", status_code = 200, 
         state = "FINISHED", ), mock_httr_response("http://localhost:8000/query_4/1", 
         status_code = 200, data = data.frame(a = 1, b = TRUE), state = "FINISHED", ))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(a = 1, 
         b = "t", stringsAsFactors = FALSE), state = "FINISHED", )
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 26. Error: extract.data works (@test-extract.data.R#39)  --------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: mock_httr_response("dummy_url", state = "dummy_state", status_code = 0, data = d, 
         ) at testthat/test-extract.data.R:39
  2: data.to.list(data)
  3: lapply(data, function(l) {
         drv <- RPresto::Presto()
         if (is.list(l)) {
             rs.class <- data.class(l[[1]])
             if (rs.class == "raw") {
                 rv <- "varbinary"
             }
             else if (rs.class == "list") {
                 rv <- ifelse(is.null(names(l[[1]])), "array", "map")
             }
             else {
                 stop("Unsupported mock data type: ", rs.class)
             }
         }
         else {
             rv <- dbDataType(RPresto::Presto(), l)
         }
         return(rv)
     })
  4: FUN(X[[i]], ...)
  5: dbDataType(RPresto::Presto(), l)
  6: dbDataType(RPresto::Presto(), l)
  7: stringi::stri_trans_toupper
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  -- 27. Error: fetch works with mock (@test-fetch.R#30)  ------------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "RUNNING", request_body = "SELECT 1 AS n", next_uri = "http://localhost:8000/query_1/1")), 
         `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
             status_code = 200, data = data.frame(n = 1), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
             mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, 
                 data = data.frame(n = 2), state = "FINISHED")), {
             result <- dbSendQuery(conn, "SELECT 1 AS n")
             expect_error(fetch(result, 1), ".*fetching custom number of rows.*is not supported.*")
             expect_equal(fetch(result), data.frame(n = 1))
             expect_equal(fetch(result, -1), data.frame(n = 2))
             expect_true(dbHasCompleted(result))
             result <- dbSendQuery(conn, "SELECT 1 AS n")
             expect_equal(fetch(result, -1), data.frame(n = c(1, 2)))
         }) at testthat/test-fetch.R:30
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         data = data.frame(n = 1), state = "FINISHED", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, data = data.frame(n = 2), 
             state = "FINISHED"))
  10: mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, data = data.frame(n = 1), 
         state = "FINISHED", next_uri = "http://localhost:8000/query_1/2")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 28. Error: fetch works with duplicate column names - mock (@test-fetch.R#84) 
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`httr::POST` = mock_httr_replies(mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PLANNING", request_body = "SELECT a, a FROM one_column", 
         next_uri = "http://localhost:8000/query_1/1"), mock_httr_response("http://localhost:8000/v1/statement", 
         status_code = 200, state = "PLANNING", request_body = "SELECT a, a FROM no_rows", 
         next_uri = "http://localhost:8000/query_2/1")), `httr::GET` = mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", 
         status_code = 200, state = "PLANNING", next_uri = "http://localhost:8000/query_1/2"), 
         mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, state = "RUNNING", 
             data = data.frame(a = 1, a = 1, check.names = FALSE), next_uri = "http://localhost:8000/query_1/3"), 
         mock_httr_response("http://localhost:8000/query_1/3", status_code = 200, state = "RUNNING", 
             data = data.frame(a = 2, a = 2, check.names = FALSE), next_uri = "http://localhost:8000/query_1/4"), 
         mock_httr_response("http://localhost:8000/query_1/4", status_code = 200, state = "FINISHED", 
             data = data.frame(a = 3, a = 3, check.names = FALSE), ), mock_httr_response("http://localhost:8000/query_2/1", 
             status_code = 200, state = "PLANNING", next_uri = "http://localhost:8000/query_2/2"), 
         mock_httr_response("http://localhost:8000/query_2/2", status_code = 200, state = "FINISHED", 
             data = data.frame(a = 1, a = 1, check.names = FALSE)[FALSE, , drop = FALSE])), 
         {
             result <- dbSendQuery(conn, "SELECT a, a FROM one_column")
             expect_equal_data_frame(dbFetch(result, n = Inf), data.frame(a = 1:3, a = 1:3, 
                 check.names = FALSE))
             result <- dbSendQuery(conn, "SELECT a, a FROM no_rows")
             expect_equal_data_frame(dbFetch(result, n = Inf), data.frame(a = 1, a = 1, 
                 check.names = FALSE)[FALSE, , drop = FALSE])
         }) at testthat/test-fetch.R:84
  2: extract_mocks(new_values = new_values[!code_pos], .env = .env, eval_env = parent.frame())
  3: lapply(stats::setNames(nm = mock_qual_names), function(qual_name) {
         pkg_name <- gsub(pkg_and_name_rx, "\\1", qual_name)
         if (is_base_pkg(pkg_name)) {
             stop("Can't mock functions in base packages (", pkg_name, ")", call. = FALSE)
         }
         name <- gsub(pkg_and_name_rx, "\\2", qual_name)
         if (pkg_name == "") 
             pkg_name <- .env
         env <- asNamespace(pkg_name)
         if (!exists(name, envir = env, mode = "function")) 
             stop("Function ", name, " not found in environment ", environmentName(env), 
                 ".", call. = FALSE)
         mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
     })
  4: FUN(X[[i]], ...)
  5: mock(name = name, env = env, new = eval(new_values[[qual_name]], eval_env, eval_env))
  6: structure(list(env = env, name = as.name(name), orig_value = .Call(duplicate_, target_value), 
         target_value = target_value, new_value = new), class = "mock")
  7: eval(new_values[[qual_name]], eval_env, eval_env)
  8: eval(new_values[[qual_name]], eval_env, eval_env)
  9: mock_httr_replies(mock_httr_response("http://localhost:8000/query_1/1", status_code = 200, 
         state = "PLANNING", next_uri = "http://localhost:8000/query_1/2"), mock_httr_response("http://localhost:8000/query_1/2", 
         status_code = 200, state = "RUNNING", data = data.frame(a = 1, a = 1, check.names = FALSE), 
         next_uri = "http://localhost:8000/query_1/3"), mock_httr_response("http://localhost:8000/query_1/3", 
         status_code = 200, state = "RUNNING", data = data.frame(a = 2, a = 2, check.names = FALSE), 
         next_uri = "http://localhost:8000/query_1/4"), mock_httr_response("http://localhost:8000/query_1/4", 
         status_code = 200, state = "FINISHED", data = data.frame(a = 3, a = 3, check.names = FALSE), 
         ), mock_httr_response("http://localhost:8000/query_2/1", status_code = 200, state = "PLANNING", 
         next_uri = "http://localhost:8000/query_2/2"), mock_httr_response("http://localhost:8000/query_2/2", 
         status_code = 200, state = "FINISHED", data = data.frame(a = 1, a = 1, check.names = FALSE)[FALSE, 
             , drop = FALSE]))
  10: mock_httr_response("http://localhost:8000/query_1/2", status_code = 200, state = "RUNNING", 
         data = data.frame(a = 1, a = 1, check.names = FALSE), next_uri = "http://localhost:8000/query_1/3")
  ...
  14: dbDataType(RPresto::Presto(), l)
  15: dbDataType(RPresto::Presto(), l)
  16: stringi::stri_trans_toupper
  17: getExportedValue(pkg, name)
  18: asNamespace(ns)
  19: getNamespace(ns)
  20: tryCatch(loadNamespace(name), error = function(e) stop(e))
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  23: value[[3L]](cond)
  
  -- 29. Error: get.state works (@test-get.state.R#18)  --------------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: RPresto:::response.to.content(mock_httr_response("dummy_url", state = "dummy_state", 
         status_code = 0, data = data.frame.with.all.classes())[["response"]]) at testthat/test-get.state.R:18
  2: httr::content(response, as = "text", encoding = "UTF-8")
  3: stopifnot(is.response(x))
  4: is.response(x)
  5: inherits(x, "response")
  6: mock_httr_response("dummy_url", state = "dummy_state", status_code = 0, data = data.frame.with.all.classes())
  7: data.to.list(data)
  8: lapply(data, function(l) {
         drv <- RPresto::Presto()
         if (is.list(l)) {
             rs.class <- data.class(l[[1]])
             if (rs.class == "raw") {
                 rv <- "varbinary"
             }
             else if (rs.class == "list") {
                 rv <- ifelse(is.null(names(l[[1]])), "array", "map")
             }
             else {
                 stop("Unsupported mock data type: ", rs.class)
             }
         }
         else {
             rv <- dbDataType(RPresto::Presto(), l)
         }
         return(rv)
     })
  9: FUN(X[[i]], ...)
  10: dbDataType(RPresto::Presto(), l)
  11: dbDataType(RPresto::Presto(), l)
  12: stringi::stri_trans_toupper
  13: getExportedValue(pkg, name)
  14: asNamespace(ns)
  15: getNamespace(ns)
  16: tryCatch(loadNamespace(name), error = function(e) stop(e))
  17: tryCatchList(expr, classes, parentenv, handlers)
  18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  19: value[[3L]](cond)
  
  -- 30. Error: response.to.content works (@test-response.to.content.R#15)  ------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: mock_httr_response("dummy_url", state = "dummy_state", status_code = 0, extra_content = list(extra = jsonlite::unbox("content")), 
         data = data.frame(l = TRUE, m = NA_integer_, n = {
             x <- "öðýþüçÖÐÝÞÜÇ"
             Encoding(x) <- "UTF-8"
             x
         }, stringsAsFactors = FALSE)) at testthat/test-response.to.content.R:15
  2: data.to.list(data)
  3: lapply(data, function(l) {
         drv <- RPresto::Presto()
         if (is.list(l)) {
             rs.class <- data.class(l[[1]])
             if (rs.class == "raw") {
                 rv <- "varbinary"
             }
             else if (rs.class == "list") {
                 rv <- ifelse(is.null(names(l[[1]])), "array", "map")
             }
             else {
                 stop("Unsupported mock data type: ", rs.class)
             }
         }
         else {
             rv <- dbDataType(RPresto::Presto(), l)
         }
         return(rv)
     })
  4: FUN(X[[i]], ...)
  5: dbDataType(RPresto::Presto(), l)
  6: dbDataType(RPresto::Presto(), l)
  7: stringi::stri_trans_toupper
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  -- 31. Error: as() works (@test-translate_sql.R#22)  ---------------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(translate_sql(as(x, 0), con = s[["con"]]), dplyr::sql("CAST(\"x\" AS DOUBLE)")) at testthat/test-translate_sql.R:22
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: translate_sql(as(x, 0), con = s[["con"]])
  5: translate_sql_(quos(...), con = con, vars_group = vars_group, vars_order = vars_order, 
         vars_frame = vars_frame, window = window)
  6: map(dots, function(x) {
         if (is_atomic(get_expr(x))) {
             escape(get_expr(x), con = con)
         }
         else {
             overscope <- sql_overscope(x, variant, con, window = window)
             on.exit(overscope_clean(overscope))
             escape(overscope_eval_next(overscope, x))
         }
     })
  7: lapply(.x, .f, ...)
  8: FUN(X[[i]], ...)
  9: escape(overscope_eval_next(overscope, x))
  10: overscope_eval_next(overscope, x)
  11: as(x, 0)
  12: stringi::stri_trans_toupper
  13: getExportedValue(pkg, name)
  14: asNamespace(ns)
  15: getNamespace(ns)
  16: tryCatch(loadNamespace(name), error = function(e) stop(e))
  17: tryCatchList(expr, classes, parentenv, handlers)
  18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  19: value[[3L]](cond)
  
  == testthat results  ===========================================================
  OK: 97 SKIPPED: 27 FAILED: 31
  1. Error: PrestoCursor methods work correctly with POST data (@test-PrestoCursor.R#85) 
  2. Error: presto simple types are correct (@test-dbDataType.R#14) 
  3. Error: conversion to array is correct (@test-dbDataType.R#40) 
  4. Error: conversion to map is correct (@test-dbDataType.R#64) 
  5. Error: dbExistsTable works with mock (@test-dbExistsTable.R#19) 
  6. Error: dbFetch works with mock (@test-dbFetch.R#37) 
  7. Error: dbFetch rbind works correctly (@test-dbFetch.R#215) 
  8. Error: dbFetch rbind works with zero row chunks (@test-dbFetch.R#264) 
  9. Error: dbGetInfo works with mock (@test-dbGetInfo.R#50) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted