Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Update AWS SDK version, sbt version, add test, fix log lines (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
realstraw authored Sep 19, 2019
1 parent 163764e commit b49469e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val awsSdkVersion = "1.11.486"
val awsSdkVersion = "1.11.618"
val slickVersion = "3.2.3"

val scalaTestArtifact = "org.scalatest" %% "scalatest" % "3.0.5" % "test"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.6
sbt.version=1.3.0
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,19 @@ object StartScheduledPipelines extends StarportActivity {
p, options.scheduledStart, options.scheduledEnd, localJars(p.jar))

Console.err.print(output)

if (status == 0) { // deploy successfully, perform activation
activatePipeline(p, pipelineName, options.scheduledStart, options.actualStart, options.scheduledEnd)
logger.info(
s"deployed pipeline ${p.name} in ${TimeUnit.SECONDS.convert(timerInst.stop(), TimeUnit.NANOSECONDS)}"
)
} else { // otherwise handle the failure and send notification
ErrorHandler.pipelineScheduleFailed(p, output)
logger.warn(
s"failed to deploy pipeline ${p.name} in ${TimeUnit.SECONDS.convert(timerInst.stop(), TimeUnit.NANOSECONDS)}"
)
}

val nano = timerInst.stop()
logger.info(s"deployed pipeline ${p.name} in ${TimeUnit.SECONDS.convert(nano, TimeUnit.NANOSECONDS)}")
}

db.run(DBIO.seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,44 @@ class DateTimeFunctionsSpec extends WordSpec {
}

}


"timesTillEnd" should {
"generate the correct number of times" in {

assert(
DateTimeFunctions.timesTillEnd(
new DateTime("2016-12-18T00:00:00Z"),
new DateTime("2016-12-19T00:00:00Z"),
1.day
) === 1
)

assert(
DateTimeFunctions.timesTillEnd(
new DateTime("2016-12-18T00:00:00Z"),
new DateTime("2016-12-19T00:00:00Z"),
1.hour
) === 24
)

assert(
DateTimeFunctions.timesTillEnd(
new DateTime("2016-12-18T00:00:00Z"),
new DateTime("2016-12-19T00:00:00Z"),
30.minutes
) === 48
)

assert(
DateTimeFunctions.timesTillEnd(
new DateTime("2016-12-18T00:00:00Z"),
new DateTime("2016-12-18T01:00:00Z"),
1.minutes
) === 60
)

}

}
}
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "5.9.4"
version in ThisBuild := "5.9.5"

0 comments on commit b49469e

Please sign in to comment.