Skip to content

Commit

Permalink
Updated sql-cloudant dependencies (apache#90)
Browse files Browse the repository at this point in the history
Bumped java-cloudant to 2.17.0 and okhttp to 3.12.2
  • Loading branch information
emlaver authored and lresende committed Jun 12, 2019
1 parent d1200cb commit 221c1f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
24 changes: 2 additions & 22 deletions sql-cloudant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,38 +50,18 @@
<dependency>
<groupId>com.cloudant</groupId>
<artifactId>cloudant-client</artifactId>
<version>2.11.0</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.9.0</version>
<version>3.12.2</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.6.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.6.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.6.7</version>
</dependency>
<dependency>
<groupId>org.scalaj</groupId>
<artifactId>scalaj-http_${scala.binary.version}</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import org.apache.spark.sql.SparkSession
class CloudantChangesDFSuite extends ClientSparkFunSuite {
val endpoint = "_changes"

before {
override def beforeAll() {
super.beforeAll()
spark = SparkSession.builder().config(conf)
.config("cloudant.protocol", TestUtils.getProtocol)
.config("cloudant.host", TestUtils.getHost)
Expand All @@ -35,10 +36,6 @@ class CloudantChangesDFSuite extends ClientSparkFunSuite {
.getOrCreate()
}

after {
spark.close()
}

testIf("load and save data from Cloudant database", TestUtils.shouldRunTest) {
// Loading data from Cloudant db
val df = spark.read.format("org.apache.bahir.cloudant").load("n_flight")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class CloudantOptionSuite extends ClientSparkFunSuite with BeforeAndAfter {
spark.read.format("org.apache.bahir.cloudant").load("db")
}
assert(thrown.getMessage === s"Option \'cloudant.numberOfRetries\' failed with exception " +
s"""java.lang.NumberFormatException: For input string: "five"""")
s"java.lang.NumberFormatException: Illegal value for config key cloudant.numberOfRetries: " +
s"""For input string: "five"""")
}
}

0 comments on commit 221c1f4

Please sign in to comment.