jonkeane commented on a change in pull request #11680:
URL: https://github.com/apache/arrow/pull/11680#discussion_r747694735
##########
File path: r/tests/testthat/test-filesystem.R
##########
@@ -132,6 +132,19 @@ test_that("LocalFileSystem + Selector", {
expect_equal(sum(types == FileType$Directory), 1L)
})
+# This test_that block must be above the two that follow it because
S3FileSystem$create
+# uses a slightly different set of cpp code that is R-only, so if there are
bugs
+# in the initialization of S3 (e.g. ARROW-14667) they will not be caught
because
+# the blocks "FileSystem$from_uri" and "SubTreeFileSystem$create() with URI"
actually
+# initialize it
+test_that("S3FileSystem", {
+ skip_on_cran()
+ skip_if_not_available("s3")
+ skip_if_offline()
+ s3fs <- S3FileSystem$create()
+ expect_r6_class(s3fs, "S3FileSystem")
+})
Review comment:
This isn't a _great_ way to test this (I guess we could also test this
specific code in a subprocess?), but it does hit the bug we saw without the
fix, so would have caught this. I'm a bit more confident that the
initialization is tested elsewhere for the two blocks below since they are in
libarrow itself, whereas the cpp code that was problematic for
`S3FileSystem$create()` was in the r package itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]