File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
docker-controller-scala-core/src/main/scala/com/github/j5ik2o/dockerController Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,16 @@ lazy val baseSettings = Seq(
4646 semanticdbVersion := scalafixSemanticdb.revision,
4747 Test / publishArtifact := false ,
4848 Test / fork := true
49- // testForkedParallel := true,
50- // concurrentRestrictions := {
51- // val par = parallelExecution.value
52- // val max = EvaluateTask.SystemProcessors
53- // List(
54- // Tags.limitAll(if (par) max else 1),
55- // Tags.limit(Tags.ForkedTestGroup, 2),
56- // Tags.exclusiveGroup(Tags.Clean)
57- // )
58- // }
49+ testForkedParallel := true ,
50+ concurrentRestrictions := {
51+ val par = parallelExecution.value
52+ val max = EvaluateTask .SystemProcessors
53+ List (
54+ Tags .limitAll(if (par) max else 1 ),
55+ Tags .limit(Tags .ForkedTestGroup , 2 ),
56+ Tags .exclusiveGroup(Tags .Clean )
57+ )
58+ }
5959)
6060
6161val `docker-controller-scala-core` = (project in file(" docker-controller-scala-core" ))
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import java.nio.channels.ServerSocketChannel
55
66trait RandomPortUtil {
77
8- def temporaryServerAddress (interface : String = " 127.0.0.1" ): InetSocketAddress = {
8+ def temporaryServerAddress (interface : String = " 127.0.0.1" ): InetSocketAddress = synchronized {
99 val serverSocket = ServerSocketChannel .open()
1010 try {
1111 serverSocket.socket.bind(new InetSocketAddress (interface, 0 ))
@@ -14,7 +14,7 @@ trait RandomPortUtil {
1414 } finally serverSocket.close()
1515 }
1616
17- def temporaryServerHostnameAndPort (interface : String = " 127.0.0.1" ): (String , Int ) = {
17+ def temporaryServerHostnameAndPort (interface : String = " 127.0.0.1" ): (String , Int ) = synchronized {
1818 val socketAddress = temporaryServerAddress(interface)
1919 socketAddress.getHostName -> socketAddress.getPort
2020 }
You can’t perform that action at this time.
0 commit comments