Skip to content

Commit

Permalink
Fix Windows CI (#58)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
andrewwinters5000 authored Jun 25, 2024
1 parent ee72a13 commit 6c4cf0c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/test_visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6c4cf0c

Please sign in to comment.