Skip to content

Commit

Permalink
Remove unneeded printlns (#3205)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippus authored Nov 8, 2024
1 parent 06c05b9 commit e21462d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
AnalyzeRequest(Array("hello world"))
.analyzer("smartcn")
)
println(content)
content mustBe
"""{"text":["hello world"],"analyzer":"smartcn"}""".stripMargin
}
Expand All @@ -25,7 +24,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
.analyzer("smartcn")
.explain(true)
)
println(content)
content mustBe
"""{"text":["hello world"],"analyzer":"smartcn","explain":true}""".stripMargin
}
Expand All @@ -36,7 +34,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
.explain(true)
.tokenizer("keyword")
)
println(content)
content mustBe
"""{"text":["hello world"],"explain":true,"tokenizer":"keyword"}""".stripMargin
}
Expand All @@ -48,7 +45,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
.filters("lowercase")
.charFilters("html_strip")
)
println(content)
content mustBe
"""{"text":["hello world"],"tokenizer":"keyword","filter":["lowercase"],"char_filter":["html_strip"]}""".stripMargin
}
Expand All @@ -60,7 +56,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
.filters("lowercase","uppercase")
.filters(StopAnalyzer("stop",List("a","is","this")))
)
println(content)
content mustBe
"""{"text":["hello world"],"tokenizer":"keyword","filter":["lowercase","uppercase",{"type":"stop","stopwords":["a","is","this"]}]}""".stripMargin
}
Expand All @@ -70,7 +65,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
AnalyzeRequest(Array("hello world"))
.normalizer("my_normalizer")
)
println(content)
content mustBe
"""{"text":["hello world"],"normalizer":"my_normalizer"}""".stripMargin
}
Expand All @@ -80,7 +74,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
AnalyzeRequest(Array("hello world"))
.field("obj1.field1")
)
println(content)
content mustBe
"""{"text":["hello world"],"field":"obj1.field1"}""".stripMargin
}
Expand All @@ -90,7 +83,6 @@ class AnalyseRequestContentBuilderTest extends AnyFunSuite with Matchers {
AnalyzeRequest(Array("hello world"))
.attributes("keyword")
)
println(content)
content mustBe
"""{"text":["hello world"],"attributes":["keyword"]}""".stripMargin
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class AnalyzeRequestHandlerTest extends AnyFunSuite with Matchers with IndexHand
.index("testIndex")
val result = AnalyzeRequestHandler.build(analyzeRequest)

println(result)

result.method mustBe "GET"
result.endpoint mustBe "/testIndex/_analyze"
result.entity.foreach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class IntervalsQueryBuilderFnTest extends AnyFunSuite with Matchers with GivenWh
When("Intervals query is built")
val queryBody = queries.IntervalsQueryBuilderFn(query)

println(queryBody.string)
Then("query should have right fields")
queryBody.string should matchJson(intervalsWithFilterQuery)
}
Expand Down Expand Up @@ -103,7 +102,6 @@ class IntervalsQueryBuilderFnTest extends AnyFunSuite with Matchers with GivenWh
When("Intervals query is built")
val queryBody = queries.IntervalsQueryBuilderFn(query)

println(queryBody.string)
Then("query should have right fields")
queryBody.string should matchJson(intervalsWithScriptQuery)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,21 @@ class CatsEffectTest extends AnyFlatSpec {
"ElasticClient#execute" should "compile and infer effect type as `IO`" in {
for {
r1 <- client.execute(createIndex(index))
_ <- IO(println(r1))
r2 <- client.execute(deleteIndex(index))
_ <- IO(println(r2))
} yield (r1, r2)
}

it should "still compile with other Cats `Async` instances with explicit type annotations" in {
for {
r1 <- client.execute[CreateIndexRequest, CreateIndexResponse, OptionIO](createIndex(index))
_ <- IO(println(r1)).to[OptionIO]
r2 <- client.execute[DeleteIndexRequest, DeleteIndexResponse, OptionIO](deleteIndex(index))
_ <- IO(println(r2)).to[OptionIO]
} yield (r1, r2)
}

it should "still compile with `Future` with explicit type annotations" in {
for {
r1 <- client.execute[CreateIndexRequest, CreateIndexResponse, Future](createIndex(index))
_ <- Future(println(r1))
r2 <- client.execute[DeleteIndexRequest, DeleteIndexResponse, Future](deleteIndex(index))
_ <- Future(println(r2))
} yield (r1, r2)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,21 @@ class CatsEffectTest extends AnyFlatSpec {
"ElasticClient#execute" should "compile and infer effect type as `IO`" in {
for {
r1 <- client.execute(createIndex(index))
_ <- IO(println(r1))
r2 <- client.execute(deleteIndex(index))
_ <- IO(println(r2))
} yield (r1, r2)
}

it should "still compile with other Cats `Async` instances with explicit type annotations" in {
for {
r1 <- client.execute[CreateIndexRequest, CreateIndexResponse, OptionIO](createIndex(index))
_ <- IO(println(r1)).to[OptionIO]
r2 <- client.execute[DeleteIndexRequest, DeleteIndexResponse, OptionIO](deleteIndex(index))
_ <- IO(println(r2)).to[OptionIO]
} yield (r1, r2)
}

it should "still compile with `Future` with explicit type annotations" in {
for {
r1 <- client.execute[CreateIndexRequest, CreateIndexResponse, Future](createIndex(index))
_ <- Future(println(r1))
r2 <- client.execute[DeleteIndexRequest, DeleteIndexResponse, Future](deleteIndex(index))
_ <- Future(println(r2))
} yield (r1, r2)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class AnalyzeRequestTests extends AnyFlatSpec with Matchers with DockerTests {
.tokenizer("letter")
}.await.result

println(result)
result shouldBe NoExplainAnalyzeResponse(
List(
AnalyseToken("hello", 0, 5, "word", 0),
Expand Down

0 comments on commit e21462d

Please sign in to comment.