File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 44Enhancements and Fixes
55----------------------
66
7+ - Fix raise_if_error() to use cached job phase instead of re-polling [#743]
8+
79- Add ``pyvo.registry.get_RegTAP_service_url() `` to allow users to inspect the
810 currently configured registry endpoint. Expose other user-facing constants at their package level. [#742]
911
Original file line number Diff line number Diff line change @@ -1045,9 +1045,9 @@ def raise_if_error(self):
10451045 DALQueryError
10461046 if theres an error
10471047 """
1048- if self .phase in {"ERROR" , "ABORTED" }:
1048+ if self ._job . phase in {"ERROR" , "ABORTED" }:
10491049 msg = ""
1050- if self ._job and self . _job .errorsummary :
1050+ if self ._job .errorsummary :
10511051 msg = self ._job .errorsummary .message .content
10521052 msg = msg or "<No useful error from server>"
10531053 raise DALQueryError ("Query Error: " + msg , self .url )
Original file line number Diff line number Diff line change @@ -617,6 +617,16 @@ def test_erroneus_submit_job(self):
617617 job .raise_if_error ()
618618 assert 'test_erroneus_submit.non_existent not found' in str (e )
619619
620+ def test_raise_if_error_uses_cached_phase (self , async_fixture ):
621+ matchers = async_fixture
622+ service = TAPService ('http://example.com/tap' )
623+ job = service .submit_job (
624+ "SELECT * FROM test_erroneus_submit.non_existent" )
625+ call_count_before = matchers ["job" ].call_count
626+ with pytest .raises (DALQueryError ):
627+ job .raise_if_error ()
628+ assert call_count_before == matchers ["job" ].call_count
629+
620630 @pytest .mark .usefixtures ('async_fixture' )
621631 def test_submit_job_case (self ):
622632 """Test using mixed case in the QUERY parameter to a job.
You can’t perform that action at this time.
0 commit comments