From 6c4cf0c00c661cdc4c602d5b63b0f578a8c72c16 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 15:51:56 +0200 Subject: [PATCH] Fix Windows CI (#58) * bump up sleep time in testing * bump CI to use julia 1.10 * set sleep command back to 2 seconds * revert to Julia 1.6 for CI. Didn't fix anything * try adding calls to the garbage collector * add better comment and cleanup unnecessary sleep commands --- test/test_visualization.jl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index b3156b29..08b9f13f 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -61,8 +61,11 @@ using CairoMakie # Create the mesh which contains a plotting update for ISM @test_nowarn generate_mesh(p_visu, verbose=true) - # Add a delay to ensure that the Windows system has released the file handles - sleep(2.0) # arbitrarily pick 2 seconds + # Explicitly call the garbage collector to remove any temporaries + # before an attempt to delete any files. Helps avoid an error of type + # `IOError: unlink("some_file"): resource busy or locked (EBUSY)` + # on Windows CI runners + GC.gc() # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) @@ -95,8 +98,11 @@ using CairoMakie # Create the mesh which contains a plotting update for ISM-V2 @test_nowarn generate_mesh(p_visu) - # Add a delay to ensure that the Windows system has released the file handles - sleep(2.0) # arbitrarily pick 2 seconds + # Explicitly call the garbage collector to remove any temporaries + # before an attempt to delete any files. Helps avoid an error of type + # `IOError: unlink("some_file"): resource busy or locked (EBUSY)` + # on Windows CI runners + GC.gc() # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu)