Skip to content

Commit

Permalink
Fixes #82
Browse files Browse the repository at this point in the history
  • Loading branch information
TebaleloS committed Mar 10, 2023
1 parent bfd34ea commit f01d273
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ abstract class OncePerSparkSession() extends Serializable {
}

def register(implicit spark: SparkSession): Boolean = {
val created = OncePerSparkSession.registerMe(this, spark)
val registered = OncePerSparkSession.registerMe(this, spark)

if (created == this) true
if (registered == this) true
else false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OncePerSparkSessionTest extends AnyFunSuite with MockitoSugar with SparkTe
var libraryBInitCounter = 0

val anotherSpark: SparkSession = mock[SparkSession]
class UDFLibraryA()(implicit sparkToRegisterTo: Option[SparkSession]) extends OncePerSparkSession()(sparkToRegisterTo) {
class UDFLibraryA()(implicit sparkToRegisterTo: Option[SparkSession]) extends OncePerSparkSession() {
override def register(implicit spark: Option[SparkSession]): Unit = {
libraryAInitCounter += 1
}
Expand Down

0 comments on commit f01d273

Please sign in to comment.