Skip to content

Commit 80042c8

Browse files
committed
[skip changelog] Add small delay to upgrade tests
1 parent de7f641 commit 80042c8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

test/test_core.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import simplejson as json
1919
import tempfile
2020
import hashlib
21+
import time
2122
from git import Repo
2223
from pathlib import Path
2324

@@ -455,6 +456,11 @@ def test_core_upgrade_removes_unused_tools(run_command, data_dir):
455456
# Upgrades core
456457
assert run_command("core upgrade arduino:avr")
457458

459+
# OS X filesystem is eventually consistent so wait a bit before
460+
# verifying folder is deleted
461+
if platform.system() == "Darwin":
462+
time.sleep(1)
463+
458464
# Verifies tool is uninstalled since it's not used by newer core version
459465
assert not tool_path.exists()
460466

@@ -472,5 +478,10 @@ def test_core_install_removes_unused_tools(run_command, data_dir):
472478
# Installs newer version of already installed core
473479
assert run_command("core install arduino:avr@1.8.3")
474480

481+
# OS X filesystem is eventually consistent so wait a bit before
482+
# verifying folder is deleted
483+
if platform.system() == "Darwin":
484+
time.sleep(1)
485+
475486
# Verifies tool is uninstalled since it's not used by newer core version
476487
assert not tool_path.exists()

test/test_upgrade.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# software without disclosing the source code of your own applications. To purchase
1414
# a commercial license, send an email to license@arduino.cc.
1515

16+
import time
17+
import platform
1618
from pathlib import Path
1719

1820

@@ -80,5 +82,10 @@ def test_upgrade_unused_core_tools_are_removed(run_command, data_dir):
8082
# Upgrades everything
8183
assert run_command("upgrade")
8284

85+
# OS X filesystem is eventually consistent so wait a bit before
86+
# verifying folder is deleted
87+
if platform.system() == "Darwin":
88+
time.sleep(1)
89+
8390
# Verifies tool is uninstalled since it's not used by newer core version
8491
assert not tool_path.exists()

0 commit comments

Comments
 (0)