From e6c75922e9a87ad715053f81fbbb3b13fbb97f76 Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Thu, 21 Jan 2016 11:14:53 +0200 Subject: [PATCH 1/8] eliminated using of JDK-8 at community-build --- build.sbt | 20 ++++++++++---------- src/main/scala/gopher/Transputer.scala | 4 +++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index 7f39ccae..538cd6c2 100644 --- a/build.sbt +++ b/build.sbt @@ -26,16 +26,16 @@ libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.13" version:="0.99.6-SNAPSHOT" - -publishMavenStyle := true - -publishTo <<= version { (v: String) => - val nexus = "https://oss.sonatype.org/" - if (v.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") -} +// disable publish to sonatype from community build: +//publishMavenStyle := true +// +//publishTo <<= version { (v: String) => +// val nexus = "https://oss.sonatype.org/" +// if (v.trim.endsWith("SNAPSHOT")) +// Some("snapshots" at nexus + "content/repositories/snapshots") +// else +// Some("releases" at nexus + "service/local/staging/deploy/maven2") +//} publishArtifact in Test := false diff --git a/src/main/scala/gopher/Transputer.scala b/src/main/scala/gopher/Transputer.scala index b6ebbf4c..a5644bef 100644 --- a/src/main/scala/gopher/Transputer.scala +++ b/src/main/scala/gopher/Transputer.scala @@ -330,7 +330,9 @@ object Transputer class TooManyFailures(t: Transputer) extends RuntimeException(s"Too many failures for ${t}", t.recoveryStatistics.firstFailure.get) { - addSuppressed(t.recoveryStatistics.lastFailure.get) + val lastFailure = t.recoveryStatistics.lastFailure.get + //wait for jdk 8 + // addSuppressed(t.recoveryStatistics.lastFailure.get) } object RecoveryPolicy { From 7965880e3d51683cb5ff7191b3b1a2bcface019c Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Thu, 21 Jan 2016 11:47:37 +0200 Subject: [PATCH 2/8] added explicit setting of private implicit executionContext (to satisficy community-build) --- src/main/scala/gopher/channels/Channel.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/gopher/channels/Channel.scala b/src/main/scala/gopher/channels/Channel.scala index 1731d4d6..2c909ca6 100644 --- a/src/main/scala/gopher/channels/Channel.scala +++ b/src/main/scala/gopher/channels/Channel.scala @@ -35,11 +35,11 @@ class IOChannel[A](futureChannelRef: Future[ActorRef], override val api: GopherA futureChannelRef.foreach{ ref => val f = ref.ask(ClosedChannelRead(cont))(5 seconds) f.onFailure{ case e: AskTimeoutException => applyClosed() - } + }(api.executionContext) f.onSuccess{ case ChannelCloseProcessed(0) => closedEmpty = true - } + }(api.executionContext) } } } else { From 139c3baff77f4c06787731055f194bea78f8ebed Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Tue, 8 Mar 2016 09:03:04 +0200 Subject: [PATCH 3/8] added executionContext to be visible in implicit search --- src/main/scala/gopher/channels/ActorBackedChannel.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/gopher/channels/ActorBackedChannel.scala b/src/main/scala/gopher/channels/ActorBackedChannel.scala index 3ca98696..3d31d018 100644 --- a/src/main/scala/gopher/channels/ActorBackedChannel.scala +++ b/src/main/scala/gopher/channels/ActorBackedChannel.scala @@ -39,7 +39,7 @@ class ActorBackedChannel[A](futureChannelRef: Future[ActorRef], override val api case ChannelCloseProcessed(0) => closedEmpty = true } - } + }(api.executionContext) } } else { futureChannelRef.foreach( _ ! cont ) From 259e90ac16e0df7df75d4510478487d980daab0c Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Fri, 21 Oct 2016 08:13:33 +0300 Subject: [PATCH 4/8] increased scheduled future timeout for working on busy machines. --- src/test/scala/gopher/channels/SchedulerStartupTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/scala/gopher/channels/SchedulerStartupTest.scala b/src/test/scala/gopher/channels/SchedulerStartupTest.scala index 2e2144f3..9726f06f 100644 --- a/src/test/scala/gopher/channels/SchedulerStartupTest.scala +++ b/src/test/scala/gopher/channels/SchedulerStartupTest.scala @@ -23,7 +23,7 @@ class SchedulerStartupTest extends FunSuite { ){ if (!p.isCompleted) p success 0 }(ExecutionContext.Implicits.global) - val x = Await.result(p.future, 1000 milliseconds) + val x = Await.result(p.future, 3000 milliseconds) assert(x==0) } From 861934ae29eda56e592f5208962fde053fc7fa7a Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Thu, 27 Oct 2016 06:16:44 +0300 Subject: [PATCH 5/8] increased test timeout --- src/test/scala/gopher/channels/UnbufferedSelectSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/scala/gopher/channels/UnbufferedSelectSuite.scala b/src/test/scala/gopher/channels/UnbufferedSelectSuite.scala index ca5dd339..222efa4e 100644 --- a/src/test/scala/gopher/channels/UnbufferedSelectSuite.scala +++ b/src/test/scala/gopher/channels/UnbufferedSelectSuite.scala @@ -52,7 +52,7 @@ class UnbufferedSelectSuite extends FunSuite with AsyncAssertions } } ch.awriteAll(1 to 10) onComplete { _ => quit success true } - val sum = Await.result(r, 1 second) + val sum = Await.result(r, 3 second) assert(sum==(1 to 10).sum) } } From df4f5fb304e9785fa1b5a61317263f193450b15f Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Sat, 12 Nov 2016 08:56:39 +0200 Subject: [PATCH 6/8] increased timeout (see https://github.com/rssh/scala-gopher/issues/17 ) --- src/test/scala/gopher/channels/IOTimeoutsSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/scala/gopher/channels/IOTimeoutsSuite.scala b/src/test/scala/gopher/channels/IOTimeoutsSuite.scala index fa5ca36f..d57f766c 100644 --- a/src/test/scala/gopher/channels/IOTimeoutsSuite.scala +++ b/src/test/scala/gopher/channels/IOTimeoutsSuite.scala @@ -99,7 +99,7 @@ class IOTimeoutsSuite extends FunSuite with AsyncAssertions { case t: chTimeout.read => implicitly[FlowTermination[Unit]].doExit(count) } - Await.ready(f, 1 second) + Await.ready(f, 3 second) assert(count==2) } From 88a4a4aff312bd54b8d02356617713669cba1c98 Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Sat, 12 Nov 2016 08:58:41 +0200 Subject: [PATCH 7/8] more timeots increased --- src/test/scala/gopher/channels/IOTimeoutsSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/scala/gopher/channels/IOTimeoutsSuite.scala b/src/test/scala/gopher/channels/IOTimeoutsSuite.scala index d57f766c..026ead46 100644 --- a/src/test/scala/gopher/channels/IOTimeoutsSuite.scala +++ b/src/test/scala/gopher/channels/IOTimeoutsSuite.scala @@ -62,7 +62,7 @@ class IOTimeoutsSuite extends FunSuite with AsyncAssertions { f2 onComplete { x => w(assert(x.isFailure && x.failed.get.isInstanceOf[ChannelClosedException])) w.dismiss() } - Await.ready(f2, 1 second) + Await.ready(f2, 3 seconds) val f3 = chTimeout.aread f3 onComplete { x => w(assert(x.isFailure && x.failed.get.isInstanceOf[ChannelClosedException])) w.dismiss() From 8c6795b9d97bf79ccfddf43f4923bd40c2f2ce92 Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Sat, 12 Nov 2016 09:02:19 +0200 Subject: [PATCH 8/8] no cross-buidl in community-build --- build.sbt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 643b5f64..a2b89f63 100644 --- a/build.sbt +++ b/build.sbt @@ -3,8 +3,7 @@ name:="scala-gopher" organization:="com.github.rssh" -scalaVersion := "2.12.0" -crossScalaVersions := Seq("2.11.8", "2.12.0") +scalaVersion := "2.11.8" resolvers += Resolver.sonatypeRepo("snapshots")