sam / doubleshot

Build and Dependency Management for mixed Java/Ruby projects.
MIT License
19 stars 22 forks source link

test/watch double-runs of single-spec execution #19

Closed sam closed 11 years ago

sam commented 11 years ago

Single spec execution double-runs specs for some reason. This doesn't appear to happen immediately, and I'm honestly not sure if it's just user-error and I'm saving the file twice.

If there's a bug, we should resolve it.

Additionally, to handle an itchy trigger finger on CMD+S it probably makes sense to add a current_tests stack so we don't execute a test if it's already on the stack. This would prevent tests from executing twice when we save twice in quick succession, but allow us to still execute all impacted specs if we were to Save All.

sam commented 11 years ago

So far I can't reproduce double-runs as a bug, just as a habitual double-tap on the Save shortcut...

sam commented 11 years ago

The bug is definitely there. I can't reproduce it intentionally yet. It seems to only happen following a test failure. I suspect it's something to do with the Exception catching around RubyInstance execution but I'm not entirely sure. Really need to figure out how to reproduce reliably.

sam commented 11 years ago

Ok, this is a bug with the Listen gem. It's executing the change block twice in succession. Nothing we can really do about that at the consumer level.

We need to investigate if there's a newer release, with better JRuby 1.7 compatibility as well (so it stops using the polling fallback).