Advertisement
Guest User

Untitled

a guest
Mar 19th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. Hello,
  2.  
  3. together with Anna Stępień and Maciej Biłas we started working on following issues:
  4. - https://github.com/scalatest/scalatest/issues/97
  5. - https://github.com/sbt/sbt/issues/228
  6.  
  7. We decided to focus on handling CTRL-C during test execution in sbt console.
  8.  
  9. As for now we:
  10. 1. Created Stoppable interface in sbt.testing (test-interface)
  11. 2. Changed ScalaTest ScalaTestRunner so that it implements Stoppable interface. Currently stopping ScalaTestRunner does not stop/kill running test cases but new test cases/suites
  12. are not executed.
  13. 3. We changed sbt so that SIGINT is intercepted and tests are stopped.
  14.  
  15. But then incidentally we found Signal (in util/collection/src/main/scala/sbt) and TaskCancellationStrategy.Signal that was introduced by:
  16.  
  17. commit 2686acd99326d99bf2f17a488858d6df5e27d52a
  18. Author: Josh Suereth <joshua.suereth@gmail.com>
  19. Date: Mon Apr 7 16:42:08 2014 -0400
  20.  
  21. Part #1 of cancel-task-hooks - Hooks EvaluateTask.
  22.  
  23. a year ago. And we found that after setting `set cancelable in Global := true` CTRL-C interrupts threads related to the task that's being executed.
  24.  
  25. Our idea was CTRL-C should stop executing new test cases and then (e.g. after second CTRL-C/some timeout) interrupt TestingFramework threads because interrupting threads is quite
  26. dirty in our opinion.
  27.  
  28. But maybe interrupting threads is the right thing to do - it's dirty but it's also simple and works for all kind of tasks, not only for `test` task.
  29.  
  30. What do you think is a better strategy? Is it provi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement