@@ -185,7 +185,7 @@ public void setUp() {
185
185
public void createDropIndexQuery () {
186
186
givenSparkExecutionEngineConfigIsSupplied ();
187
187
givenValidDataSourceMetadataExist ();
188
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
188
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
189
189
String indexName = "flint_datasource_name_table_name_index_name_index" ;
190
190
givenFlintIndexMetadataExists (indexName );
191
191
givenCancelJobRunSucceed ();
@@ -209,7 +209,7 @@ public void createDropIndexQuery() {
209
209
public void createVacuumIndexQuery () {
210
210
givenSparkExecutionEngineConfigIsSupplied ();
211
211
givenValidDataSourceMetadataExist ();
212
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
212
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
213
213
String indexName = "flint_datasource_name_table_name_index_name_index" ;
214
214
givenFlintIndexMetadataExists (indexName );
215
215
@@ -231,7 +231,7 @@ public void createVacuumIndexQuery() {
231
231
public void createAlterIndexQuery () {
232
232
givenSparkExecutionEngineConfigIsSupplied ();
233
233
givenValidDataSourceMetadataExist ();
234
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
234
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
235
235
String indexName = "flint_datasource_name_table_name_index_name_index" ;
236
236
givenFlintIndexMetadataExists (indexName );
237
237
givenCancelJobRunSucceed ();
@@ -261,7 +261,7 @@ public void createAlterIndexQuery() {
261
261
public void createStreamingQuery () {
262
262
givenSparkExecutionEngineConfigIsSupplied ();
263
263
givenValidDataSourceMetadataExist ();
264
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
264
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
265
265
when (awsemrServerless .startJobRun (any ()))
266
266
.thenReturn (new StartJobRunResult ().withApplicationId (APPLICATION_ID ).withJobRunId (JOB_ID ));
267
267
@@ -297,7 +297,7 @@ private void verifyStartJobRunCalled() {
297
297
public void createCreateIndexQuery () {
298
298
givenSparkExecutionEngineConfigIsSupplied ();
299
299
givenValidDataSourceMetadataExist ();
300
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
300
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
301
301
when (awsemrServerless .startJobRun (any ()))
302
302
.thenReturn (new StartJobRunResult ().withApplicationId (APPLICATION_ID ).withJobRunId (JOB_ID ));
303
303
@@ -321,7 +321,7 @@ public void createCreateIndexQuery() {
321
321
public void createRefreshQuery () {
322
322
givenSparkExecutionEngineConfigIsSupplied ();
323
323
givenValidDataSourceMetadataExist ();
324
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
324
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
325
325
when (awsemrServerless .startJobRun (any ()))
326
326
.thenReturn (new StartJobRunResult ().withApplicationId (APPLICATION_ID ).withJobRunId (JOB_ID ));
327
327
@@ -344,7 +344,7 @@ public void createInteractiveQuery() {
344
344
givenSparkExecutionEngineConfigIsSupplied ();
345
345
givenValidDataSourceMetadataExist ();
346
346
givenSessionExists ();
347
- when (queryIdProvider .getQueryId (any ())).thenReturn (QUERY_ID );
347
+ when (queryIdProvider .getQueryId (any (), eq ( asyncQueryRequestContext ) )).thenReturn (QUERY_ID );
348
348
when (sessionIdProvider .getSessionId (any ())).thenReturn (SESSION_ID );
349
349
givenSessionExists (); // called twice
350
350
when (awsemrServerless .startJobRun (any ()))
@@ -538,7 +538,8 @@ private void givenGetJobRunReturnJobRunWithState(String state) {
538
538
}
539
539
540
540
private void verifyGetQueryIdCalled () {
541
- verify (queryIdProvider ).getQueryId (dispatchQueryRequestArgumentCaptor .capture ());
541
+ verify (queryIdProvider )
542
+ .getQueryId (dispatchQueryRequestArgumentCaptor .capture (), eq (asyncQueryRequestContext ));
542
543
DispatchQueryRequest dispatchQueryRequest = dispatchQueryRequestArgumentCaptor .getValue ();
543
544
assertEquals (ACCOUNT_ID , dispatchQueryRequest .getAccountId ());
544
545
assertEquals (APPLICATION_ID , dispatchQueryRequest .getApplicationId ());
0 commit comments