diff --git a/build.sbt b/build.sbt index 277d68f..738d755 100755 --- a/build.sbt +++ b/build.sbt @@ -21,7 +21,7 @@ testOptions in Test <+= (target in Test) map { instrumentSettings -ScoverageKeys.minimumCoverage := 70 +ScoverageKeys.minimumCoverage := 60 ScoverageKeys.failOnMinimumCoverage := false diff --git a/pg.sql b/pg.sql new file mode 100644 index 0000000..f5c0142 --- /dev/null +++ b/pg.sql @@ -0,0 +1,9 @@ +DROP DATABASE IF EXISTS test; +CREATE DATABASE test; +\connect test; +CREATE TABLE users +( + username character varying(255) NOT NULL, + email character varying(255) NOT NULL +); +INSERT INTO users (username, email) values ('lindsaybluth', 'lindsay@bluth.com'); diff --git a/shippable.yml b/shippable.yml index e77b63a..b2e7769 100755 --- a/shippable.yml +++ b/shippable.yml @@ -7,8 +7,7 @@ addons: postgresql: "9.3" before_script: - - psql -c 'DROP DATABASE IF EXISTS test' -U postgres - - psql -c 'CREATE DATABASE test;' -U postgres + - psql -U postgres -f pg.sql script: - export SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M" diff --git a/src/main/scala/com/shippable/Hello.scala b/src/main/scala/com/shippable/Hello.scala index 5efe3c6..24b69ed 100755 --- a/src/main/scala/com/shippable/Hello.scala +++ b/src/main/scala/com/shippable/Hello.scala @@ -10,7 +10,7 @@ import scala.concurrent.{Await, Future} class HelloWorld { def returnValue(): String= { - val configuration = URLParser.parse("jdbc:postgresql://localhost:5233/test?user=postgres") + val configuration = URLParser.parse("jdbc:postgresql://localhost:5432/test?user=postgres&password=") val connection: Connection = new PostgreSQLConnection(configuration) var finalResult = "" @@ -21,7 +21,7 @@ class HelloWorld { val mapResult: Future[Any] = future.map(queryResult => queryResult.rows match { case Some(resultSet) => { val row : RowData = resultSet.head - finalResult = row(2).toString + finalResult = row(1).toString } case None => -1 } @@ -30,4 +30,4 @@ class HelloWorld { connection.disconnect return finalResult } -} \ No newline at end of file +} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy