| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -441,9 +441,6 @@ public com.google.api.services.bigquery.model.Job call() throws IOException { | |||
| 441 | 441 | && createException.getCause() != null | |
| 442 | 442 | && createException.getCause().getMessage() != null) { | |
| 443 | 443 | ||
| 444 | - /*GoogleJsonResponseException createExceptionCause = | ||
| 445 | - (GoogleJsonResponseException) createException.getCause();*/ | ||
| 446 | - | ||
| 447 | 444 | Pattern pattern = Pattern.compile(".*Already.*Exists:.*Job.*", Pattern.CASE_INSENSITIVE); | |
| 448 | 445 | Matcher matcher = pattern.matcher(createException.getCause().getMessage()); | |
| 449 | 446 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -187,7 +187,7 @@ private Builder(com.google.api.services.bigquery.model.JobConfiguration configur | |||
| 187 | 187 | this(); | |
| 188 | 188 | JobConfigurationQuery queryConfigurationPb = configurationPb.getQuery(); | |
| 189 | 189 | this.query = queryConfigurationPb.getQuery(); | |
| 190 | - // Allows to get undeclaredqueryparameters in jobstatistics2 | ||
| 190 | + // Allows to get undeclared query parameters in jobstatistics | ||
| 191 | 191 | if (queryConfigurationPb.getQueryParameters() == null | |
| 192 | 192 | && queryConfigurationPb.getParameterMode() != null) { | |
| 193 | 193 | parameterMode = queryConfigurationPb.getParameterMode(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -208,10 +208,8 @@ public Dataset createSkipExceptionTranslation(Dataset dataset, Map<Option, ?> op | |||
| 208 | 208 | .insert(dataset.getDatasetReference().getProjectId(), dataset) | |
| 209 | 209 | .setPrettyPrint(false) | |
| 210 | 210 | .setFields(Option.FIELDS.getString(options)); | |
| 211 | - for (Map.Entry<Option, ?> entry : options.entrySet()) { | ||
| 212 | - if (entry.getKey() == Option.ACCESS_POLICY_VERSION && entry.getValue() != null) { | ||
| 213 | - bqCreateRequest.setAccessPolicyVersion((Integer) entry.getValue()); | ||
| 214 | - } | ||
| 211 | + if (options.containsKey(Option.ACCESS_POLICY_VERSION)) { | ||
| 212 | + bqCreateRequest.setAccessPolicyVersion((Integer) options.get(Option.ACCESS_POLICY_VERSION)); | ||
| 215 | 213 | } | |
| 216 | 214 | return bqCreateRequest.execute(); | |
| 217 | 215 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1334,7 +1334,7 @@ public void testUpdateDatasetWithSelectedFields() { | |||
| 1334 | 1334 | } | |
| 1335 | 1335 | ||
| 1336 | 1336 | @Test | |
| 1337 | - public void testUpdateDatabaseWithAccessPolicyVersion() throws IOException { | ||
| 1337 | + public void testUpdateDatasetWithAccessPolicyVersion() throws IOException { | ||
| 1338 | 1338 | String accessPolicyDataset = RemoteBigQueryHelper.generateDatasetName(); | |
| 1339 | 1339 | ServiceAccountCredentials credentials = | |
| 1340 | 1340 | (ServiceAccountCredentials) GoogleCredentials.getApplicationDefault(); | |
@@ -1827,7 +1827,7 @@ public void testCreateDatasetWithAccessPolicyVersion() throws IOException { | |||
| 1827 | 1827 | } | |
| 1828 | 1828 | ||
| 1829 | 1829 | @Test(expected = BigQueryException.class) | |
| 1830 | - public void testCreateDatabaseWithInvalidAccessPolicyVersion() throws IOException { | ||
| 1830 | + public void testCreateDatasetWithInvalidAccessPolicyVersion() throws IOException { | ||
| 1831 | 1831 | String accessPolicyDataset = RemoteBigQueryHelper.generateDatasetName(); | |
| 1832 | 1832 | ServiceAccountCredentials credentials = | |
| 1833 | 1833 | (ServiceAccountCredentials) GoogleCredentials.getApplicationDefault(); | |
@@ -4040,8 +4040,7 @@ public void testBQResultSetPagination() throws SQLException { | |||
| 4040 | 4040 | assertEquals(300000, cnt); // total 300000 rows should be read | |
| 4041 | 4041 | } | |
| 4042 | 4042 | ||
| 4043 | - // @Test - Temporarily disabling till https://github.com/googleapis/gax-java/issues/1712 or | ||
| 4044 | - // b/235591056 are resolved | ||
| 4043 | + @Test | ||
| 4045 | 4044 | public void testReadAPIIterationAndOrder() | |
| 4046 | 4045 | throws SQLException { // use read API to read 300K records and check the order | |
| 4047 | 4046 | String query = | |
@@ -4240,8 +4239,7 @@ public void testCreateDefaultConnection() throws BigQuerySQLException { | |||
| 4240 | 4239 | assertTrue(connection.close()); | |
| 4241 | 4240 | } | |
| 4242 | 4241 | ||
| 4243 | - // @Test - Temporarily disabling till https://github.com/googleapis/gax-java/issues/1712 or | ||
| 4244 | - // b/235591056 are resolved | ||
| 4242 | + @Test | ||
| 4245 | 4243 | public void testReadAPIConnectionMultiClose() | |
| 4246 | 4244 | throws | |
| 4247 | 4245 | SQLException { // use read API to read 300K records, then closes the connection. This test | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,6 +94,7 @@ public void tearDown() { | |||
| 94 | 94 | DeleteTable.deleteTable(viewDatasetName, viewName); | |
| 95 | 95 | DeleteTable.deleteTable(viewDatasetName, tableName); | |
| 96 | 96 | DeleteDataset.deleteDataset(PROJECT_ID, datasetName); | |
| 97 | + DeleteDataset.deleteDataset(PROJECT_ID, viewDatasetName); | ||
| 97 | 98 | // restores print statements in the original method | |
| 98 | 99 | System.out.flush(); | |
| 99 | 100 | System.setOut(originalPrintStream); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments