From f6c1054a21ee9f7e80a5ea66e7afe21a17248477 Mon Sep 17 00:00:00 2001 From: "David H. Irving" Date: Mon, 9 Dec 2024 15:51:38 -0700 Subject: [PATCH] Fix intermittent failure in unit tests testRetrieveAll in test_cliCmdRetrieveArtifacts.py was failing intermittently, any time that the zip index happened to be the second file in the directory listing. --- tests/test_cliCmdRetrieveArtifacts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_cliCmdRetrieveArtifacts.py b/tests/test_cliCmdRetrieveArtifacts.py index 28690816dd..69907f6180 100644 --- a/tests/test_cliCmdRetrieveArtifacts.py +++ b/tests/test_cliCmdRetrieveArtifacts.py @@ -75,6 +75,7 @@ def testRetrieveAll(self): self.assertTrue(result.stdout.endswith(": 6\n"), f"Expected 6 got: {result.stdout}") artifacts = self.find_files(destdir) + artifacts.sort() self.assertEqual(len(artifacts), 7, f"Expected 7 artifacts including index: {artifacts}") self.assertIn(f"{destdir}{prefix}", str(artifacts[1])) @@ -95,6 +96,7 @@ def testRetrieveSubset(self): self.assertEqual(result.exit_code, 0, clickResultMsg(result)) self.assertTrue(result.stdout.endswith(": 3\n"), f"Expected 3 got: {result.stdout}") artifacts = self.find_files(destdir) + artifacts.sort() self.assertEqual(len(artifacts), 4, f"Expected 4 artifacts including index: {artifacts}") def testRetrieveAsZip(self):