From d13e7b1783626133b0e51eb6f7b6a097379171f7 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 12:25:42 +0200 Subject: [PATCH 1/6] bump up sleep time in testing --- test/test_visualization.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index b3156b29..57b96685 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -62,7 +62,7 @@ using CairoMakie @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 + sleep(5.0) # arbitrarily pick 5 seconds # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) @@ -96,7 +96,7 @@ using CairoMakie @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 + sleep(5.0) # arbitrarily pick 5 seconds # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) From 632b9254a00fe9dcd57496d8835008e9c01595a6 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 14:42:14 +0200 Subject: [PATCH 2/6] bump CI to use julia 1.10 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9f904d7..47c4ea82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: version: - - '1.6' + - '1.10' # - 'nightly' os: - ubuntu-latest From b136cc98dd9d931ab69fb2e95265862bf4bbe78f Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 14:43:08 +0200 Subject: [PATCH 3/6] set sleep command back to 2 seconds --- test/test_visualization.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 57b96685..b3156b29 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -62,7 +62,7 @@ using CairoMakie @test_nowarn generate_mesh(p_visu, verbose=true) # Add a delay to ensure that the Windows system has released the file handles - sleep(5.0) # arbitrarily pick 5 seconds + sleep(2.0) # arbitrarily pick 2 seconds # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) @@ -96,7 +96,7 @@ using CairoMakie @test_nowarn generate_mesh(p_visu) # Add a delay to ensure that the Windows system has released the file handles - sleep(5.0) # arbitrarily pick 5 seconds + sleep(2.0) # arbitrarily pick 2 seconds # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) From 04c36a6606a80631b05c66e49b07ccf61d75d661 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 14:52:13 +0200 Subject: [PATCH 4/6] revert to Julia 1.6 for CI. Didn't fix anything --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47c4ea82..d9f904d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: version: - - '1.10' + - '1.6' # - 'nightly' os: - ubuntu-latest From 8469747c04d030c1014c4c1889b47573f044968c Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 14:54:50 +0200 Subject: [PATCH 5/6] try adding calls to the garbage collector --- test/test_visualization.jl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index b3156b29..124b8eef 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -61,8 +61,12 @@ 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 + GC.gc() + + # # Add a delay to ensure that the Windows system has released the file handles + # sleep(2.0) # arbitrarily pick 2 seconds # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) @@ -95,8 +99,12 @@ using CairoMakie # Create the mesh which contains a plotting update for ISM-V2 @test_nowarn generate_mesh(p_visu) + # Explicitly call the garbage collector to remove any temporaries + # before an attempt to delete any files + GC.gc() + # Add a delay to ensure that the Windows system has released the file handles - sleep(2.0) # arbitrarily pick 2 seconds + # sleep(2.0) # arbitrarily pick 2 seconds # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) From 621228cbf948ca76aaaf97a8ff95e4848ea4c504 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 25 Jun 2024 15:15:38 +0200 Subject: [PATCH 6/6] add better comment and cleanup unnecessary sleep commands --- test/test_visualization.jl | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 124b8eef..08b9f13f 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -62,12 +62,11 @@ using CairoMakie @test_nowarn generate_mesh(p_visu, verbose=true) # Explicitly call the garbage collector to remove any temporaries - # before an attempt to delete any files + # 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() - # # Add a delay to ensure that the Windows system has released the file handles - # sleep(2.0) # arbitrarily pick 2 seconds - # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) @@ -100,12 +99,11 @@ using CairoMakie @test_nowarn generate_mesh(p_visu) # Explicitly call the garbage collector to remove any temporaries - # before an attempt to delete any files + # 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() - # Add a delay to ensure that the Windows system has released the file handles - # sleep(2.0) # arbitrarily pick 2 seconds - # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu)