Created
November 30, 2015 17:02
-
-
Save orikremer/0a3a2bcd4b9ef72f231a to your computer and use it in GitHub Desktop.
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
defmodule ConcurrentSessionsTest do | |
use ExUnit.Case | |
use Hound.Helpers | |
defmodule Tester do | |
def test do | |
Hound.start_session | |
url = "http://localhost:9090/page1.html" | |
navigate_to(url) | |
url == current_url | |
end | |
end | |
test "should be able to run multiple sessions concurrently" do | |
1..11 | |
|> Enum.map(fn(_) -> Task.async(fn -> Tester.test end) end) | |
|> Enum.map(fn(task) -> Task.await(task, 60000) end) | |
|> Enum.each(fn(e) -> assert e end) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment