Skip to content

Commit

Permalink
added akka-slf4j api
Browse files Browse the repository at this point in the history
akka logs to selenate-server.log
fixed timeouts
  • Loading branch information
dstimac committed Jul 3, 2015
1 parent 24c2444 commit 8de74f5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Expand Up @@ -28,7 +28,7 @@ public ActorBase(final ActorRef session) {
protected Object block(final Object req) throws IOException {
try {
final Future<Object> future = Patterns.ask(session, req, timeout);
final Object result = Await.result(future, timeout.duration());
final Object result = Await.result(future, new Timeout(32, TimeUnit.SECONDS).duration());
return result;
} catch (final Exception e) {
throw new IOException(String.format("An error occured while sending the message to remote actor!\nMessage: %s", req.toString()), e);
Expand Down
1 change: 1 addition & 0 deletions code/Server/src/main/resources/application.conf
@@ -1,4 +1,5 @@
akka {
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
loglevel = DEBUG

actor {
Expand Down
Expand Up @@ -3,7 +3,7 @@ package net.selenate.server.sessions.actions
import scala.annotation.tailrec

trait WaitFor {
private val timeout = 29000
private val timeout = 25000
private val resolution = 250

def waitForPredicate[T](predicate: => Option[T]): Option[T] = {
Expand Down
3 changes: 2 additions & 1 deletion code/project/Dependencies.scala
Expand Up @@ -5,6 +5,7 @@ object Dependencies {
val akkaVersion = "2.1.2"
val akkaActor = "com.typesafe.akka" %% "akka-actor" % akkaVersion
val akkaRemote = "com.typesafe.akka" %% "akka-remote" % akkaVersion
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % akkaVersion

val jodaTimeConvert = "org.joda" % "joda-convert" % "1.3.1"
val jodaTimeTime = "joda-time" % "joda-time" % "2.2"
Expand All @@ -30,7 +31,7 @@ object Dependencies {
val scalaTest = "org.scalatest" %% "scalatest" % "2.2.4"
val slf4j = "org.slf4j" % "slf4j-api" % "1.7.5"

val akka = Seq(akkaActor, akkaRemote)
val akka = Seq(akkaActor, akkaRemote, akkaSlf4j)
val jodaTime = Seq(jodaTimeConvert, jodaTimeTime)
val selenium = Seq(seleniumFirefox, seleniumServer)
val sikuli = Seq(sikuliApi, javaCV, openCV, openCVPlatform)
Expand Down

0 comments on commit 8de74f5

Please sign in to comment.