Skip to content

Commit

Permalink
Testing against jruby and rubinius, yey
Browse files Browse the repository at this point in the history
since I noticed we were only one error away from being jruby compatible
and rubinius was already working.
  • Loading branch information
meatballhat committed Feb 18, 2014
1 parent 59e1679 commit e024f80
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .simplecov
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
SimpleCov.start { add_filter '/test/' } if ENV['COVERAGE']
if ENV['COVERAGE'] && RUBY_PLATFORM !~ /java/
SimpleCov.start { add_filter '/test/' }
end
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ rvm:
env:
global:
- RESQUE_SCHEDULER_DISABLE_TEST_REDIS_SERVER=1
matrix:
allow_failures:
- rvm: jruby-19mode
- rvm: rbx
services:
- redis-server
notifications:
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'

task default: [:rubocop, :test]
task default: [:rubocop, :test] unless RUBY_PLATFORM =~ /java/
task default: [:test] if RUBY_PLATFORM =~ /java/

Rubocop::RakeTask.new

Expand Down
9 changes: 5 additions & 4 deletions test/scheduler_task_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@

test 'sending TERM to scheduler breaks out of poll_sleep' do
Resque::Scheduler.expects(:release_master_lock!)
fork do
sleep(0.5)
system("kill -TERM #{Process.ppid}")
exit!

@pid = Process.pid
Thread.new do
sleep 0.5
Process.kill(:TERM, @pid)
end

assert_raises SystemExit do
Expand Down

0 comments on commit e024f80

Please sign in to comment.