From c7be4b1e8bf14e5c2b19a91fa892ab7d5004bd29 Mon Sep 17 00:00:00 2001 From: Alex Klibisz Date: Sat, 18 Nov 2023 21:10:19 -0800 Subject: [PATCH] Fix test compilation --- .../test/scala/com/klibisz/elastiknn/models/L2LshSuite.scala | 2 +- .../klibisz/elastiknn/vectors/PanamaFloatVectorOpsSpec.scala | 2 +- .../scala/com/klibisz/elastiknn/CloseIndexRegressionSuite.scala | 2 +- .../klibisz/elastiknn/models/ExactSimilarityFunctionSuite.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elastiknn-models/src/test/scala/com/klibisz/elastiknn/models/L2LshSuite.scala b/elastiknn-models/src/test/scala/com/klibisz/elastiknn/models/L2LshSuite.scala index 1a6d9fec2..acb2e142e 100644 --- a/elastiknn-models/src/test/scala/com/klibisz/elastiknn/models/L2LshSuite.scala +++ b/elastiknn-models/src/test/scala/com/klibisz/elastiknn/models/L2LshSuite.scala @@ -10,7 +10,7 @@ import scala.util.Random class L2LshSuite extends AnyFunSuite with Matchers { - implicit val rng = new Random(0) + implicit val rng: Random = new Random(0) test("produces exactly L hashes with probes = 0") { val vec = Vec.DenseFloat.random(10) diff --git a/elastiknn-models/src/test/scala/com/klibisz/elastiknn/vectors/PanamaFloatVectorOpsSpec.scala b/elastiknn-models/src/test/scala/com/klibisz/elastiknn/vectors/PanamaFloatVectorOpsSpec.scala index c695d8f7d..548a00718 100644 --- a/elastiknn-models/src/test/scala/com/klibisz/elastiknn/vectors/PanamaFloatVectorOpsSpec.scala +++ b/elastiknn-models/src/test/scala/com/klibisz/elastiknn/vectors/PanamaFloatVectorOpsSpec.scala @@ -11,7 +11,7 @@ class PanamaFloatVectorOpsSpec extends AnyFreeSpec with Matchers { private val dfvo = new DefaultFloatVectorOps private val pfvo = new PanamaFloatVectorOps private val seed = System.currentTimeMillis() - private implicit val rng = new Random(seed) + private implicit val rng: Random = new Random(seed) info(s"Testing with seed $seed") private def compare(f1: Double, f2: Double) = { diff --git a/elastiknn-plugin-integration-tests/src/test/scala/com/klibisz/elastiknn/CloseIndexRegressionSuite.scala b/elastiknn-plugin-integration-tests/src/test/scala/com/klibisz/elastiknn/CloseIndexRegressionSuite.scala index 7a1da63e5..88957f6b5 100644 --- a/elastiknn-plugin-integration-tests/src/test/scala/com/klibisz/elastiknn/CloseIndexRegressionSuite.scala +++ b/elastiknn-plugin-integration-tests/src/test/scala/com/klibisz/elastiknn/CloseIndexRegressionSuite.scala @@ -10,7 +10,7 @@ import scala.util.Random class CloseIndexRegressionSuite extends AsyncFunSuite with Matchers with ElasticAsyncClient { - implicit val rng = new Random(0) + implicit val rng: Random = new Random(0) test("close index without elastiknn setting") { val index = "issue-215-close-no-elastiknn" diff --git a/elastiknn-plugin/src/test/scala/com/klibisz/elastiknn/models/ExactSimilarityFunctionSuite.scala b/elastiknn-plugin/src/test/scala/com/klibisz/elastiknn/models/ExactSimilarityFunctionSuite.scala index 2ab5f770a..a7f3e5856 100644 --- a/elastiknn-plugin/src/test/scala/com/klibisz/elastiknn/models/ExactSimilarityFunctionSuite.scala +++ b/elastiknn-plugin/src/test/scala/com/klibisz/elastiknn/models/ExactSimilarityFunctionSuite.scala @@ -12,7 +12,7 @@ class ExactSimilarityFunctionSuite extends AnyFunSpec with Matchers { private val reps = 1000 private val tol = 1e-7 private val seed = System.currentTimeMillis() - private implicit val rng = new Random(seed) + private implicit val rng: Random = new Random(seed) info(s"Testing with seed $seed") describe("L2 Similarity") {