You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2023/02/21 06:37:10 UTC

[buildstream] 02/04: tests/frontend/show.py: xfail a test which we cannot properly assert

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/python3.11-bst1
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 2da08305959b61cf52ff7f0c55c58147614c52af
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Tue Feb 21 15:35:34 2023 +0900

    tests/frontend/show.py: xfail a test which we cannot properly assert
    
    We can no longer assert that the client has exited without throwing
    an exception.
---
 tests/frontend/show.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index 7df5b7679..204816bf1 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -269,6 +269,7 @@ def test_fetched_junction(cli, tmpdir, datafiles, element_name, workspaced):
 ###############################################################
 #                   Testing recursion depth                   #
 ###############################################################
+@pytest.mark.xfail("dependency_depth", [100, 500, 1200])
 @pytest.mark.parametrize("dependency_depth", [100, 500, 1200])
 def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth):
     project_name = "recursion-test"
@@ -314,8 +315,14 @@ def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth):
     if dependency_depth <= recursion_limit:
         result.assert_success()
     else:
-        #  Assert exception is thown and handled
-        assert not result.unhandled_exception
+        # XXX Assert exception is thown and handled
+        #
+        # We need to assert that the client has not thrown a stack trace for
+        # a recursion error, this should be done by creating a BstError instead
+        # of just handling it in app.py and doing sys.exit(), because we no longer
+        # have any way of detecting whether the client has thrown an exception
+        # otherwise
+        #
         assert result.exit_code == -1
 
     shutil.rmtree(project_path)