Skip to content

Instantly share code, notes, and snippets.


Luciano Molinari lucmolinari

View GitHub Profile
View Cats Effect IO - EitherT
import cats.effect.{ExitCode, IO, IOApp}
import cats.implicits._
object MockedProgram extends IOApp {
def run(args: List[String]): IO[ExitCode] = {
// val a1 = for {
// s <- EitherT.right(IO(1))
View HelloWorld.scala
import scala.concurrent.Future
object HelloWorld {
val theOneWhoCannotBeNamed = "Voldemort"
def sayHelloTo(name: String): Future[Option[String]] = {
Future {
if (theOneWhoCannotBeNamed.equals(name)) None else Some(getHelloMessage(name))
lucmolinari / arquillian-clustered-docker.txt
Last active Nov 11, 2015
Using arquillian with Docker without any extensions
View arquillian-clustered-docker.txt
I have a test project which main purpose is to test our software running in clustered environments.
For this, we have a set of containers defined as mode="manual". We extensively use
ContainerController and Deployer APIs to start/stop containers and deploy/undeploy applications.
This works fine in the jboss-as-arquillian-container-managed environemt.
Now we're working on a POC to use Docker in these tests. The idea is to use
jboss-as-arquillian-container-remote adapter and, in our code, instead of using the
ContainerController to start/stop the container, we'd use docker-java API. We've been able to start
the container as expected, but the the Deployer API can not deploy the app because it thinks the
container is not running.