Skip to content

Commit 686270d

Browse files
committed
Merge branch 'master' of github.com:GoogleCloudPlatform/google-cloud-java into dev
2 parents 19adbc5 + bf8df09 commit 686270d

File tree

76 files changed

+1508
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1508
-271
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ If you are using Maven, add this to your pom.xml file
4444
<dependency>
4545
<groupId>com.google.cloud</groupId>
4646
<artifactId>google-cloud</artifactId>
47-
<version>0.9.3-alpha</version>
47+
<version>0.9.4-alpha</version>
4848
</dependency>
4949
```
5050
If you are using Gradle, add this to your dependencies
5151
```Groovy
52-
compile 'com.google.cloud:google-cloud:0.9.3-alpha'
52+
compile 'com.google.cloud:google-cloud:0.9.4-alpha'
5353
```
5454
If you are using SBT, add this to your dependencies
5555
```Scala
56-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.9.3-alpha"
56+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.9.4-alpha"
5757
```
5858

5959
Example Applications

google-cloud-bigquery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-bigquery</artifactId>
25-
<version>0.9.3-beta</version>
25+
<version>0.9.4-beta</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-bigquery:0.9.3-beta'
30+
compile 'com.google.cloud:google-cloud-bigquery:0.9.4-beta'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.9.3-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.9.4-beta"
3535
```
3636

3737
Example Application

google-cloud-bigquery/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.9.4-alpha-SNAPSHOT</version>
15+
<version>0.9.4-alpha</version>
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryExceptionTest.java

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
import static org.junit.Assert.assertSame;
2727
import static org.junit.Assert.assertTrue;
2828

29+
import com.google.api.client.http.HttpHeaders;
30+
import com.google.api.client.http.HttpResponseException;
2931
import com.google.cloud.BaseServiceException;
3032
import com.google.cloud.RetryHelper.RetryHelperException;
31-
32-
import org.junit.Test;
33-
3433
import java.io.IOException;
3534
import java.net.SocketTimeoutException;
35+
import org.junit.Test;
3636

3737
public class BigQueryExceptionTest {
3838

@@ -105,6 +105,34 @@ public void testBigqueryException() {
105105
assertTrue(exception.isRetryable());
106106
assertTrue(exception.isIdempotent());
107107
assertSame(cause, exception.getCause());
108+
109+
110+
HttpResponseException httpResponseException =
111+
new HttpResponseException.Builder(404, "Service Unavailable", new HttpHeaders()).build();
112+
exception = new BigQueryException(httpResponseException);
113+
assertEquals(404, exception.getCode());
114+
assertFalse(exception.isRetryable());
115+
116+
httpResponseException = new HttpResponseException.Builder(504, null, new HttpHeaders()).build();
117+
exception = new BigQueryException(httpResponseException);
118+
assertEquals(504, exception.getCode());
119+
assertTrue(exception.isRetryable());
120+
121+
httpResponseException = new HttpResponseException.Builder(503, null, new HttpHeaders()).build();
122+
exception = new BigQueryException(httpResponseException);
123+
assertEquals(503, exception.getCode());
124+
assertTrue(exception.isRetryable());
125+
126+
httpResponseException = new HttpResponseException.Builder(502, null, new HttpHeaders()).build();
127+
exception = new BigQueryException(httpResponseException);
128+
assertEquals(502, exception.getCode());
129+
assertTrue(exception.isRetryable());
130+
131+
httpResponseException = new HttpResponseException.Builder(500, null, new HttpHeaders()).build();
132+
exception = new BigQueryException(httpResponseException);
133+
assertEquals(500, exception.getCode());
134+
assertTrue(exception.isRetryable());
135+
108136
}
109137

110138
@Test

google-cloud-compute/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-compute</artifactId>
25-
<version>0.9.3-alpha</version>
25+
<version>0.9.4-alpha</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-compute:0.9.3-alpha'
30+
compile 'com.google.cloud:google-cloud-compute:0.9.4-alpha'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.9.3-alpha"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.9.4-alpha"
3535
```
3636

3737
Example Application

google-cloud-compute/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.cloud</groupId>
1313
<artifactId>google-cloud-pom</artifactId>
14-
<version>0.9.4-alpha-SNAPSHOT</version>
14+
<version>0.9.4-alpha</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>google-cloud-compute</site.installationModule>

google-cloud-contrib/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ If you are using Maven, add this to your pom.xml file
2525
<dependency>
2626
<groupId>com.google.cloud</groupId>
2727
<artifactId>google-cloud-contrib</artifactId>
28-
<version>0.9.3-alpha</version>
28+
<version>0.9.4-alpha</version>
2929
</dependency>
3030
```
3131
If you are using Gradle, add this to your dependencies
3232
```Groovy
33-
compile 'com.google.cloud:google-cloud-contrib:0.9.3-alpha'
33+
compile 'com.google.cloud:google-cloud-contrib:0.9.4-alpha'
3434
```
3535
If you are using SBT, add this to your dependencies
3636
```Scala
37-
libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.9.3-alpha"
37+
libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.9.4-alpha"
3838
```
3939

4040
### google-cloud-nio-examples

google-cloud-contrib/google-cloud-nio-examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ To run this example:
2222
4. Run the sample with:
2323
2424
```
25-
java -cp google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.9.4-alpha-SNAPSHOT-shaded.jar:google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.9.4-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
25+
java -cp google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.9.5-alpha-SNAPSHOT-shaded.jar:google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.9.5-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
2626
```
2727
2828
Notice that it lists Google Cloud Storage, which it wouldn't if you ran it without the NIO jar:
2929
```
30-
java -cp google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.9.4-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
30+
java -cp google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.9.5-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
3131
```
3232
3333
The sample doesn't have anything about Google Cloud Storage in it. It gets that ability from the NIO

google-cloud-contrib/google-cloud-nio-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.cloud</groupId>
1313
<artifactId>google-cloud-contrib</artifactId>
14-
<version>0.9.4-alpha-SNAPSHOT</version>
14+
<version>0.9.4-alpha</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>google-cloud-nio-examples</site.installationModule>

google-cloud-contrib/google-cloud-nio/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ If you are using Maven, add this to your pom.xml file
2626
<dependency>
2727
<groupId>com.google.cloud</groupId>
2828
<artifactId>google-cloud-nio</artifactId>
29-
<version>0.9.3-alpha</version>
29+
<version>0.9.4-alpha</version>
3030
</dependency>
3131
```
3232
If you are using Gradle, add this to your dependencies
3333
```Groovy
34-
compile 'com.google.cloud:google-cloud-nio:0.9.3-alpha'
34+
compile 'com.google.cloud:google-cloud-nio:0.9.4-alpha'
3535
```
3636
If you are using SBT, add this to your dependencies
3737
```Scala
38-
libraryDependencies += "com.google.cloud" % "google-cloud-nio" % "0.9.3-alpha"
38+
libraryDependencies += "com.google.cloud" % "google-cloud-nio" % "0.9.4-alpha"
3939
```
4040

4141
Example Applications

0 commit comments

Comments
 (0)