This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.effect.{ExitCode, IO, IOApp} | |
import cats.implicits._ | |
import cats.data.EitherT | |
object MockedProgram extends IOApp { | |
def run(args: List[String]): IO[ExitCode] = { | |
// val a1 = for { | |
// s <- EitherT.right(IO(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.concurrent.ExecutionContext.Implicits.global | |
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |