211211import java .util .logging .Level ;
212212import java .util .logging .Logger ;
213213import org .junit .jupiter .api .AfterAll ;
214+ import org .junit .jupiter .api .Assumptions ;
214215import org .junit .jupiter .api .BeforeAll ;
215216import org .junit .jupiter .api .Test ;
216217import org .junit .jupiter .api .Timeout ;
@@ -1271,6 +1272,7 @@ void testLosslessMaxTimestampIntegration() throws InterruptedException {
12711272
12721273 @ Test
12731274 void testListDatasets () {
1275+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
12741276 Page <Dataset > datasets = bigquery .listDatasets ("bigquery-public-data" );
12751277 Iterator <Dataset > iterator = datasets .iterateAll ().iterator ();
12761278 Set <String > datasetNames = new HashSet <>();
@@ -2131,6 +2133,7 @@ void testCreateTableWithDefaultValueExpression() {
21312133
21322134 @ Test
21332135 void testCreateAndUpdateTableWithPolicyTags () throws IOException {
2136+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
21342137 // Set up policy tags in the datacatalog service
21352138 try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient .create ()) {
21362139 CreateTaxonomyRequest createTaxonomyRequest =
@@ -2515,6 +2518,7 @@ void testCreateExternalTable() throws InterruptedException {
25152518
25162519 @ Test
25172520 void testSetPermExternalTableSchema () {
2521+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
25182522 String tableName = "test_create_external_table_perm" ;
25192523 TableId tableId = TableId .of (DATASET , tableName );
25202524 ExternalTableDefinition externalTableDefinition =
@@ -2926,6 +2930,7 @@ void testDeleteNonExistingTable() {
29262930
29272931 @ Test
29282932 void testDeleteJob () {
2933+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
29292934 String query = "SELECT 17 as foo" ;
29302935 QueryJobConfiguration config = QueryJobConfiguration .of (query );
29312936 String jobName = "jobId_" + UUID .randomUUID ().toString ();
@@ -3188,6 +3193,7 @@ void testListAllTableData() {
31883193
31893194 @ Test
31903195 void testListPageWithStartIndex () {
3196+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
31913197 String tableName = "midyear_population_agespecific" ;
31923198 TableId tableId = TableId .of (PUBLIC_PROJECT , PUBLIC_DATASET , tableName );
31933199 Table table = bigquery .getTable (tableId );
@@ -3659,6 +3665,7 @@ void testQueryStatistics() throws InterruptedException {
36593665
36603666 @ Test
36613667 void testExecuteSelectDefaultConnectionSettings () throws SQLException {
3668+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
36623669 // Use the default connection settings
36633670 Connection connection = bigquery .createConnection ();
36643671 String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;" ;
@@ -3669,6 +3676,7 @@ void testExecuteSelectDefaultConnectionSettings() throws SQLException {
36693676
36703677 @ Test
36713678 void testExecuteSelectWithReadApi () throws SQLException {
3679+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
36723680 final int rowLimit = 5000 ;
36733681 final String QUERY =
36743682 "SELECT * FROM bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_2017 LIMIT %s" ;
@@ -3699,6 +3707,7 @@ void testExecuteSelectWithReadApi() throws SQLException {
36993707
37003708 @ Test
37013709 void testExecuteSelectWithFastQueryReadApi () throws SQLException {
3710+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
37023711 final int rowLimit = 5000 ;
37033712 final String QUERY =
37043713 "SELECT * FROM bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_2017 LIMIT %s" ;
@@ -4785,6 +4794,7 @@ void testProjectIDFastSQLQueryWithJobId() {
47854794
47864795 @ Test
47874796 void testLocationFastSQLQueryWithJobId () throws InterruptedException {
4797+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
47884798 TableId tableIdFastQueryUk = TableId .of (UK_DATASET , "fastquery_testing_table" );
47894799 DatasetInfo infoUK =
47904800 DatasetInfo .newBuilder (UK_DATASET )
@@ -4960,6 +4970,7 @@ void testFastDDLQuery() throws InterruptedException {
49604970
49614971 @ Test
49624972 void testFastQuerySlowDDL () throws InterruptedException {
4973+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
49634974 String tableName = generateRandomName ("test_table_fast_query_ddl_slow_" );
49644975 // This query take more than 10s to run and should fall back on the old query path
49654976 String slowDdlQuery =
@@ -5061,6 +5072,7 @@ void testQuerySessionSupport() throws InterruptedException {
50615072
50625073 @ Test
50635074 void testLoadSessionSupportWriteChannelConfiguration () throws InterruptedException {
5075+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
50645076 TableId sessionTableId = TableId .of ("_SESSION" , "test_temp_destination_table_from_file" );
50655077
50665078 WriteChannelConfiguration configuration =
@@ -5288,6 +5300,7 @@ void testTransactionInfo() throws InterruptedException {
52885300 /* TODO(prasmish): replicate the entire test case for executeSelect */
52895301 @ Test
52905302 void testScriptStatistics () throws InterruptedException {
5303+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
52915304 String script =
52925305 "-- Declare a variable to hold names as an array.\n "
52935306 + "DECLARE top_names ARRAY<STRING>;\n "
@@ -6541,6 +6554,7 @@ void testCancelJob() throws InterruptedException, TimeoutException {
65416554
65426555 @ Test
65436556 void testCancelNonExistingJob () {
6557+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
65446558 assertFalse (bigquery .cancel ("test_cancel_non_existing_job" ));
65456559 }
65466560
@@ -6677,6 +6691,7 @@ void testInsertWithDecimalTargetTypes()
66776691
66786692 @ Test
66796693 void testLocation () throws Exception {
6694+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
66806695 String location = "EU" ;
66816696 String wrongLocation = "US" ;
66826697
@@ -7443,6 +7458,7 @@ void testTableResultJobIdAndQueryId() throws InterruptedException {
74437458
74447459 @ Test
74457460 void testStatelessQueriesWithLocation () throws Exception {
7461+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
74467462 // This test validates BigQueryOption location is used for stateless query by verifying that the
74477463 // stateless query fails when the BigQueryOption location does not match the dataset location.
74487464 String location = "EU" ;
@@ -7608,6 +7624,7 @@ void testInvalidUniverseDomainWithMismatchCredentials() {
76087624
76097625 @ Test
76107626 void testUniverseDomainWithMatchingDomain () {
7627+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
76117628 // Test a valid domain using the default credentials and Google default universe domain.
76127629 RemoteBigQueryHelper bigqueryHelper = RemoteBigQueryHelper .create ();
76137630 BigQueryOptions bigQueryOptions =
@@ -7701,6 +7718,7 @@ void testExternalMetadataCacheModeFailForNonBiglake() {
77017718
77027719 @ Test
77037720 void testObjectTable () throws InterruptedException {
7721+ Assumptions .assumeTrue (!RemoteBigQueryHelper .isRegionalEndpoint (bigquery ));
77047722 String tableName = generateRandomName ("test_object_table" );
77057723 TableId tableId = TableId .of (DATASET , tableName );
77067724
0 commit comments