These are chat archives for 47deg/fetch

Jul 2017
Justin Heyes-Jones
Jul 23 2017 04:18
I've updated my PR for adding timeout support to FetchMonadError[Future]. The tests fail for scala.js since I use thread sleep for simulating delay. I'm wondering whether it would be correct to disable that test suite for scala.js or find a different way to do the delay.
Raúl Raja Martínez
Jul 23 2017 15:43
@justinhj Perhaps a custom hacky sleep that works on JS for the test only:
def sleep(ms: Long): Unit = {
  val expTime = System.nanoTime + ms*1000000
  while(System.nanoTime < expTime) {}
snippet from scala-js/scala-js#1898
Justin Heyes-Jones
Jul 23 2017 17:40
@raulraja thanks, that works for two of the test but not the one that should timeout. I believe it is blocking the Timer callback that throws the timeout