File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ def do_query():
145145 try :
146146 query_job ._begin (retry = retry , timeout = timeout )
147147 callback (
148- QueryRequestedEvent (
148+ QuerySentEvent (
149149 query = query ,
150150 billing_project = query_job .project ,
151151 location = query_job .location ,
@@ -522,7 +522,7 @@ def do_query():
522522 span_attributes = {"path" : path }
523523
524524 callback (
525- QueryRequestedEvent (
525+ QuerySentEvent (
526526 query = query ,
527527 billing_project = project ,
528528 location = location ,
@@ -666,7 +666,7 @@ def _wait_or_cancel(
666666
667667
668668@dataclasses .dataclass (frozen = True )
669- class QueryRequestedEvent :
669+ class QuerySentEvent :
670670 query : str
671671 billing_project : str
672672 location : Optional [str ]
Original file line number Diff line number Diff line change 2222
2323import google .auth .credentials
2424import google .cloud .bigquery .client
25+ from google .cloud .bigquery import _job_helpers
2526
2627
2728PROJECT = "test-project"
@@ -51,5 +52,12 @@ def test_query_and_wait_bigframes_callback(client):
5152 {"jobComplete" : True }
5253 ),
5354 ]
54- callback = lambda _ : None
55+ callback = mock . Mock ()
5556 client ._query_and_wait_bigframes (query = "SELECT 1" , callback = callback )
57+ callback .assert_has_calls (
58+ mock .call (
59+ _job_helpers .QuerySentEvent (
60+ query = "SELECT 1" ,
61+ ),
62+ )
63+ )
You can’t perform that action at this time.
0 commit comments