OHDSI / Andromeda

AsynchroNous Disk-based Representation of MassivE DAta: An R package aimed at replacing ff for storing large data objects.
https://ohdsi.github.io/Andromeda/
11 stars 10 forks source link

add test for filelocking issue when using batchApply #49

Closed egillax closed 1 year ago

egillax commented 1 year ago

Added a test that is currently failing for me most of the time on windows because for some reason a file lock is introduced when using batchApply.

One weird thing, when pressing "test" on the test file in the rstudio GUI it always passes. But when running either testthat::test_file('./tests/test-filelocks.R') or devtools::test() it fails most of the time. I'm curious to see what happens with github actions.

I think this issue can be fixed by using the new .unsafe_delete() method (as a last resort) from Arrow 11.

@ablack3 wasn't sure if this test belongs in the same files as some other tests so I created a new file. Happy to change.

ablack3 commented 1 year ago

Thank you @egillax! A new file is good.

egillax commented 1 year ago

@ablack3 even though this is passing using github actions. This test is failing for me consistently both using a vm locally and on an amazon ec2 instance with windows. This also doesn't remove the file when I run the code in the test line by line.