summaryrefslogtreecommitdiff
path: root/example/websockets
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.li@databricks.com>2019-09-14 16:45:39 +0800
committerLi Haoyi <haoyi.li@databricks.com>2019-09-14 17:40:26 +0800
commit4e853a9d5b9563dbe1909757bf4be4d8e7d2b36a (patch)
tree684863947658d22f91804090c81a68d012b82b6c /example/websockets
parent90b6806e5fb91b207f9d8e2da2a58c25928badea (diff)
downloadcask-4e853a9d5b9563dbe1909757bf4be4d8e7d2b36a.tar.gz
cask-4e853a9d5b9563dbe1909757bf4be4d8e7d2b36a.tar.bz2
cask-4e853a9d5b9563dbe1909757bf4be4d8e7d2b36a.zip
.
Diffstat (limited to 'example/websockets')
-rw-r--r--example/websockets/app/test/src/ExampleTests.scala6
-rw-r--r--example/websockets/build.sc2
2 files changed, 4 insertions, 4 deletions
diff --git a/example/websockets/app/test/src/ExampleTests.scala b/example/websockets/app/test/src/ExampleTests.scala
index 896c051..a463824 100644
--- a/example/websockets/app/test/src/ExampleTests.scala
+++ b/example/websockets/app/test/src/ExampleTests.scala
@@ -8,7 +8,7 @@ import utest._
object ExampleTests extends TestSuite{
- def test[T](example: cask.main.BaseMain)(f: String => T): T = {
+ def withServer[T](example: cask.main.BaseMain)(f: String => T): T = {
val server = io.undertow.Undertow.builder
.addHttpListener(8080, "localhost")
.setHandler(example.defaultHandler)
@@ -21,7 +21,7 @@ object ExampleTests extends TestSuite{
}
val tests = Tests{
- 'Websockets - test(Websockets){ host =>
+ test("Websockets") - withServer(Websockets){ host =>
@volatile var out = List.empty[String]
val client = org.asynchttpclient.Dsl.asyncHttpClient();
try{
@@ -72,7 +72,7 @@ object ExampleTests extends TestSuite{
}
}
- 'Websockets2000 - test(Websockets){ host =>
+ test("Websockets2000") - withServer(Websockets){ host =>
@volatile var out = List.empty[String]
val closed = new AtomicInteger(0)
val client = org.asynchttpclient.Dsl.asyncHttpClient();
diff --git a/example/websockets/build.sc b/example/websockets/build.sc
index c788216..197e285 100644
--- a/example/websockets/build.sc
+++ b/example/websockets/build.sc
@@ -9,7 +9,7 @@ trait AppModule extends ScalaModule{
def testFrameworks = Seq("utest.runner.Framework")
def ivyDeps = Agg(
- ivy"com.lihaoyi::utest::0.6.9",
+ ivy"com.lihaoyi::utest::0.7.1",
ivy"com.lihaoyi::requests::0.2.0",
ivy"org.asynchttpclient:async-http-client:2.5.2"
)