From 526a29cb94b15192a0b0979e8dc1cb83aae91b05 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Mon, 24 Jun 2024 14:13:36 +0200 Subject: [PATCH] try again with the sleep command --- src/Mesh/Meshing.jl | 2 +- test/test_visualization.jl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Mesh/Meshing.jl b/src/Mesh/Meshing.jl index d19e2650..fa101405 100644 --- a/src/Mesh/Meshing.jl +++ b/src/Mesh/Meshing.jl @@ -60,7 +60,7 @@ function remove_mesh!(proj::Project) rm(fileName) # Get the control file name of the current project fileName = joinpath(proj.projectDirectory,proj.name) * ".control" - rm(fileName; force=true) + rm(fileName) fileName = getPlotFileName(proj) rm(fileName) fileName = getStatsFileName(proj) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 0ad0d594..b3156b29 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -61,6 +61,9 @@ 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 + # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu) @@ -92,6 +95,9 @@ 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 + # Destroy the mesh and reset the background grid @test_nowarn remove_mesh!(p_visu)