spec/sqewer/cli_spec.rb in sqewer-4.0.0 vs spec/sqewer/cli_spec.rb in sqewer-4.0.1

- old
+ new

@@ -10,11 +10,11 @@ submitter = Sqewer::Connection.default stderr = Tempfile.new('worker-stderr') stderr.sync = true - pid = fork { $stderr.reopen(stderr); exec("ruby #{__dir__}/cli_app.rb") } + pid = fork { $stderr.reopen(stderr); $stderr.sync = true; exec("ruby #{__dir__}/cli_app.rb") } Thread.new do 20.times do j = {job_class: 'MyJob', first_name: 'John', last_name: 'Doe'} submitter.send_message(JSON.dump(j)) @@ -37,10 +37,10 @@ submitter = Sqewer::Connection.default stderr = Tempfile.new('worker-stderr') stderr.sync = true - pid = fork { $stderr.reopen(stderr); exec("ruby #{__dir__}/cli_app.rb") } + pid = fork { $stderr.reopen(stderr); $stderr.sync; exec("ruby #{__dir__}/cli_app.rb") } Thread.new do 20.times do j = {job_class: 'MyJob', first_name: 'John', last_name: 'Doe'} submitter.send_message(JSON.dump(j))