Skip to content

Commit

Permalink
#000: Poorva : Fix for broken pipe error in tests. Update org to make…
Browse files Browse the repository at this point in the history
… it consistent with jitpack
  • Loading branch information
Poorva17 committed Mar 9, 2020
1 parent eeef8b8 commit e81784b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
inThisBuild(
List(
scalaVersion := "2.13.1",
organization := "org.tmt",
organization := "com.github.tmtsoftware.embedded-keycloak",
homepage := Some(url("https://github.com/tmtsoftware/embedded-keycloak")),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.tmt.embedded_keycloak.impl

import org.tmt.embedded_keycloak.impl.OsLibExtensions._
import org.tmt.embedded_keycloak.utils.Ports
import os.{proc, SubProcess}
import os.{SubProcess, proc}

class StopHandle private[embedded_keycloak] (subProcess: SubProcess, port: Int) {
def stop(): Unit = {
Expand All @@ -11,7 +10,6 @@ class StopHandle private[embedded_keycloak] (subProcess: SubProcess, port: Int)
(getChildPids andThen killAll)(process.pid())

subProcess.destroyForcibly()
Ports.stop(port)
}

private val killAll: List[Long] => Unit = _.foreach(proc("kill", "-9", _).call())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ class SmokeTest extends FunSuite with Matchers with BeforeAndAfterAll {

Eventually.eventually(Ports.checkAvailability(settings.port) shouldBe true)
}

override def afterAll(): Unit = Ports.stop(9005)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.tmt.embedded_keycloak.impl.data

import org.scalatest.{BeforeAndAfterAll, FunSuite, Matchers}
import org.tmt.embedded_keycloak.KeycloakData.{ApplicationUser, ClientRole}
import org.tmt.embedded_keycloak.utils.Ports
import org.tmt.embedded_keycloak.{EmbeddedKeycloak, KeycloakData, Settings}

import scala.concurrent.Await
Expand Down Expand Up @@ -65,8 +64,4 @@ class DataFeederTest extends FunSuite with Matchers with BeforeAndAfterAll {
stopHandle.stop()
}
}

override def afterAll(): Unit = {
Ports.stop(9005)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ class BearerTokenTest extends FunSuite with Matchers with BeforeAndAfterEach {

override def beforeEach(): Unit = {
super.afterEach()
Ports.stop(9005)
}

override def afterEach(): Unit = {
super.afterEach()
Ports.stop(9005)
}
}

0 comments on commit e81784b

Please sign in to comment.