Closed camhobbs closed 4 years ago
// threadCount is 100
val request = basicRequest.get(uri"https://cameronhobbs.net/lookup?username=test")
implicit val backend = HttpURLConnectionBackend()
for (i <- 1 to threadCount) {
val thread = new Thread {
override def run(): Unit = {
while(true) {
counter.incrementAndGet()
val response = request.send()
if(response.body.toString.contains("\"test\":false")) {
test(robot)
}
}
}
}
thread.start();
}
My lookup endpoint is built on top of an API, and will change JSON output to include {"test":false} at a certain point in time, and I want to call my test() function as soon as the json response changes
is this in sbt? which version? or what test framework?
Maybe that's because you are starting background requests (using thread.start()
), their logic continues, but the test method completes. Then the test framework detects that the classloader still loads new classes (triggered by the background threads), and reports an error?
Closing as the issue cannot be reproduced / inactivity
Hi,
I am getting the follow error on Ubuntu 19.04 (but works fine on my desktop, just not remote server).
How can I fix it?