-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relocatable rpm symlink fix #685
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,27 @@ package test | |
// use dependency library | ||
|
||
import akka.actor._ | ||
import akka.pattern._ | ||
import akka.routing.RoundRobinRouter | ||
import akka.util.Timeout | ||
import scala.concurrent.duration._ | ||
|
||
class PrintActor extends Actor{ | ||
def receive = { | ||
case msg => println(msg) | ||
case msg => | ||
println(msg) | ||
context.sender ! "ok" | ||
} | ||
} | ||
|
||
object Test extends App { | ||
implicit val timeout = Timeout(3 seconds) | ||
|
||
val system = ActorSystem("testSystem") | ||
import system.dispatcher | ||
|
||
val router = system.actorOf(Props[PrintActor]) | ||
router ! "SUCCESS!!" | ||
system.shutdown | ||
(router ? "SUCCESS!!").foreach { _ => | ||
system.shutdown | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @muuki88 - this is not related to the RPM symlink issue, but I have intermittent failure on this test today, and hence the fix. The failure is originally caused by the race condition where the actor system may be shutdown before the actor under test has the chance to print the expected message. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see little value in the addition of this function. It is another level of indirection and doesn't actually change the dir. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cancel that - I see that you're calling it from elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the
chdir
is actually not change directory - it's thechdir
variable in the RPM scriptlet which is the actual directory where the application is installed.