@@ -402,14 +402,14 @@ public void doGetTable()
402402 when (connection .getMetaData ().getURL ()).thenReturn ("jdbc:sqlserver://hostname;databaseName=fakedatabase" );
403403
404404 TableName inputTableName = new TableName (TEST_SCHEMA , TEST_TABLE );
405- when (connection .getCatalog ()).thenReturn ("testCatalog" );
406- when (connection .getMetaData ().getColumns ("testCatalog" , inputTableName .getSchemaName (), inputTableName .getTableName (), null )).thenReturn (resultSet2 );
405+ when (connection .getCatalog ()).thenReturn (TEST_CATALOG );
406+ when (connection .getMetaData ().getColumns (TEST_CATALOG , inputTableName .getSchemaName (), inputTableName .getTableName (), null )).thenReturn (resultSet2 );
407407
408408 GetTableResponse getTableResponse = this .synapseMetadataHandler .doGetTable (
409- blockAllocator , new GetTableRequest (this .federatedIdentity , TEST_QUERY_ID , "testCatalog" , inputTableName , Collections .emptyMap ()));
409+ blockAllocator , new GetTableRequest (this .federatedIdentity , TEST_QUERY_ID , TEST_CATALOG , inputTableName , Collections .emptyMap ()));
410410 assertEquals (expected , getTableResponse .getSchema ());
411411 assertEquals (inputTableName , getTableResponse .getTableName ());
412- assertEquals ("testCatalog" , getTableResponse .getCatalogName ());
412+ assertEquals (TEST_CATALOG , getTableResponse .getCatalogName ());
413413 }
414414
415415 @ Test
@@ -436,20 +436,20 @@ public void doDataTypeConversion()
436436 when (connection .getMetaData ().getURL ()).thenReturn ("jdbc:sqlserver://hostname-ondemand;databaseName=fakedatabase" );
437437
438438 TableName inputTableName = new TableName (TEST_SCHEMA , TEST_TABLE );
439- when (connection .getCatalog ()).thenReturn ("testCatalog" );
440- when (connection .getMetaData ().getColumns ("testCatalog" , inputTableName .getSchemaName (), inputTableName .getTableName (), null )).thenReturn (resultSet2 );
439+ when (connection .getCatalog ()).thenReturn (TEST_CATALOG );
440+ when (connection .getMetaData ().getColumns (TEST_CATALOG , inputTableName .getSchemaName (), inputTableName .getTableName (), null )).thenReturn (resultSet2 );
441441
442442 GetTableResponse getTableResponse = this .synapseMetadataHandler .doGetTable (
443- blockAllocator , new GetTableRequest (this .federatedIdentity , TEST_QUERY_ID , "testCatalog" , inputTableName , Collections .emptyMap ()));
443+ blockAllocator , new GetTableRequest (this .federatedIdentity , TEST_QUERY_ID , TEST_CATALOG , inputTableName , Collections .emptyMap ()));
444444 assertEquals (inputTableName , getTableResponse .getTableName ());
445- assertEquals ("testCatalog" , getTableResponse .getCatalogName ());
445+ assertEquals (TEST_CATALOG , getTableResponse .getCatalogName ());
446446 }
447447
448448 @ Test
449449 public void doListTables () throws Exception
450450 {
451451 BlockAllocator blockAllocator = new BlockAllocatorImpl ();
452- ListTablesRequest listTablesRequest = new ListTablesRequest (federatedIdentity , TEST_QUERY_ID , "testCatalog" , TEST_SCHEMA , null , 3 );
452+ ListTablesRequest listTablesRequest = new ListTablesRequest (federatedIdentity , TEST_QUERY_ID , TEST_CATALOG , TEST_SCHEMA , null , 3 );
453453
454454 DatabaseMetaData mockDatabaseMetaData = mock (DatabaseMetaData .class );
455455 ResultSet mockResultSet = mock (ResultSet .class );
@@ -589,15 +589,15 @@ public void testDoDataTypeConversion_withAzureServerless() throws Exception {
589589 when (connection .getMetaData ().getURL ()).thenReturn ("jdbc:sqlserver://test-ondemand.sql.azuresynapse.net;databaseName=fakedatabase" );
590590
591591 TableName inputTableName = new TableName (TEST_SCHEMA , TEST_TABLE );
592- when (connection .getCatalog ()).thenReturn ("testCatalog" );
592+ when (connection .getCatalog ()).thenReturn (TEST_CATALOG );
593593
594594 GetTableResponse getTableResponse = this .synapseMetadataHandler .doGetTable (
595- blockAllocator , new GetTableRequest (this .federatedIdentity , TEST_QUERY_ID , "testCatalog" , inputTableName , Collections .emptyMap ()));
595+ blockAllocator , new GetTableRequest (this .federatedIdentity , TEST_QUERY_ID , TEST_CATALOG , inputTableName , Collections .emptyMap ()));
596596
597597 // Compare schemas ignoring order
598598 assertTrue ("Schemas do not match when ignoring order" , schemasMatchIgnoringOrder (expected , getTableResponse .getSchema ()));
599599 assertEquals (inputTableName , getTableResponse .getTableName ());
600- assertEquals ("testCatalog" , getTableResponse .getCatalogName ());
600+ assertEquals (TEST_CATALOG , getTableResponse .getCatalogName ());
601601
602602 }
603603
0 commit comments