Skip to content

Commit

Permalink
try adding calls to the garbage collector
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwinters5000 committed Jun 25, 2024
1 parent 04c36a6 commit 8469747
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/test_visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8469747

Please sign in to comment.