Travis is done and never coming back

This commit is contained in:
Chris Seaton 2022-03-15 00:45:16 +00:00
parent 4cfc0a107b
commit e3d877336c
24 changed files with 38 additions and 46 deletions

View File

@ -110,7 +110,7 @@ Update the [CHANGELOG](CHANGELOG.md) with a description of what you have changed
#### Check on Your Pull Request
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI and AppVeyor. Everything should look green, otherwise fix issues (amending your commit).
Go back to your pull request after a few minutes and see whether it passed muster with GitHub Actions. Everything should look green, otherwise fix issues (amending your commit).
Please note that testing concurrency is hard. Very hard. We have a few tests that occasionally fail due (mostly) to incorrect synchronization within the test itself. If everything passes locally but you see an error on CI, it's possibly you've become victim to one of the tests. Don't worry, the Concurrent Ruby team reviews the tests output of all failed CI runs and will let you know if the failing test is unrelated to your commit.

View File

@ -77,8 +77,7 @@ begin
options = %w[ --color
--backtrace
--order defined
--format documentation
--tag ~notravis ]
--format documentation ]
t.rspec_opts = [*options].join(' ')
end

View File

@ -148,7 +148,7 @@ module Concurrent
end
end
it 'terminates with all its children', notravis: true do
it 'terminates with all its children' do
child = subject.ask! :child
expect(subject.ask!(:terminated?)).to be_falsey
subject.ask(:terminate!).wait
@ -313,7 +313,7 @@ module Concurrent
end
describe 'pool' do
it 'supports asks', notravis: true do
it 'supports asks' do
children = Queue.new
pool = Concurrent::Actor::Utils::Pool.spawn! 'pool', 5 do |index|
worker = Concurrent::Actor::Utils::AdHoc.spawn! name: "worker-#{index}", supervised: true do

View File

@ -927,7 +927,7 @@ module Concurrent
expect(count).to eq expected
end
it 'blocks forever if restarted with :clear_actions true', notravis: true do
it 'blocks forever if restarted with :clear_actions true' do
pending('the timing is nearly impossible'); fail
subject = Agent.new(0, error_mode: :fail)
@ -965,7 +965,7 @@ module Concurrent
finish.count_down
end
it 'returns true when all prior actions have processed', notravis: true do
it 'returns true when all prior actions have processed' do
subject = Agent.new(0)
subject.send_via(executor) { sleep(1) }
5.times { subject.send_via(executor) { nil } }
@ -980,7 +980,7 @@ module Concurrent
expect(subject.await_for(5)).to eq true
end
it 'returns false if restarted with :clear_actions true', notravis: true do
it 'returns false if restarted with :clear_actions true' do
pending('the timing is nearly impossible'); fail
subject = Agent.new(0, error_mode: :fail)
@ -1033,7 +1033,7 @@ module Concurrent
expect(subject.await_for(5)).to eq true
end
it 'raises an error if restarted with :clear_actions true', notravis: true do
it 'raises an error if restarted with :clear_actions true' do
pending('the timing is nearly impossible'); fail
subject = Agent.new(0, error_mode: :fail)
@ -1083,7 +1083,7 @@ module Concurrent
expect(Concurrent.monotonic_time - start).to be > 0.5
end
it 'blocks forever when timeout is nil and restarted with :clear_actions true', notravis: true do
it 'blocks forever when timeout is nil and restarted with :clear_actions true' do
pending('the timing is nearly impossible'); fail
subject = Agent.new(0, error_mode: :fail)
@ -1116,7 +1116,7 @@ module Concurrent
expect(subject.wait(5)).to eq true
end
it 'returns false when timeout is given and restarted with :clear_actions true', notravis: true do
it 'returns false when timeout is given and restarted with :clear_actions true' do
pending('the timing is nearly impossible'); fail
subject = Agent.new(0, error_mode: :fail)

View File

@ -56,7 +56,7 @@ module Concurrent
end
describe 'reset' do
it 'should release all waiting threads', notravis: true do
it 'should release all waiting threads' do
start_latch = CountDownLatch.new(1)
continue_latch = CountDownLatch.new(1)
@ -120,7 +120,7 @@ module Concurrent
expect(latch.wait(1)).to be_truthy
end
it 'return false if barrier has been reset', notravis: true do
it 'return false if barrier has been reset' do
latch = CountDownLatch.new(1)
t = in_thread { latch.count_down if barrier.wait == false }

View File

@ -169,7 +169,7 @@ module Concurrent
expect(latch.wait(0.1)).to be false
end
it 'should resist spurious wake ups with timeout', notravis: true do
it 'should resist spurious wake ups with timeout' do
latch = CountDownLatch.new(1)
t = in_thread{ subject.wait(0.5); latch.count_down }
t.join(0.1)

View File

@ -277,7 +277,7 @@ unless Concurrent.on_jruby?
end
end
it "wakes up waiting readers when the write lock is released", notravis: true do
it "wakes up waiting readers when the write lock is released" do
latch1,latch2 = CountDownLatch.new,CountDownLatch.new
good = AtomicFixnum.new(0)
threads = [

View File

@ -2,7 +2,7 @@ require_relative 'buffered_shared'
module Concurrent::Channel::Buffer
RSpec.describe Base, edge: true, notravis: true do
RSpec.describe Base, edge: true do
subject { described_class.new }

View File

@ -2,7 +2,7 @@ require_relative 'buffered_shared'
module Concurrent::Channel::Buffer
RSpec.describe Buffered, edge: true, notravis: true do
RSpec.describe Buffered, edge: true do
let(:capacity) { 10 }
subject { described_class.new(capacity) }

View File

@ -2,7 +2,7 @@ require_relative 'buffered_shared'
module Concurrent::Channel::Buffer
RSpec.describe Dropping, edge: true, notravis: true do
RSpec.describe Dropping, edge: true do
subject { described_class.new(10) }

View File

@ -2,7 +2,7 @@ require_relative 'buffered_shared'
module Concurrent::Channel::Buffer
RSpec.describe Sliding, edge: true, notravis: true do
RSpec.describe Sliding, edge: true do
subject { described_class.new(10) }

View File

@ -2,7 +2,7 @@ require_relative 'timing_buffer_shared'
module Concurrent::Channel::Buffer
RSpec.describe Ticker, edge: true, notravis: true do
RSpec.describe Ticker, edge: true do
let(:delay) { 0.1 }
subject { described_class.new(delay) }

View File

@ -2,7 +2,7 @@ require_relative 'timing_buffer_shared'
module Concurrent::Channel::Buffer
RSpec.describe Timer, edge: true, notravis: true do
RSpec.describe Timer, edge: true do
let(:delay) { 0.1 }
subject { described_class.new(0.1) }

View File

@ -2,7 +2,7 @@ require_relative 'base_shared'
module Concurrent::Channel::Buffer
RSpec.describe Unbuffered, edge: true, notravis: true do
RSpec.describe Unbuffered, edge: true do
subject { described_class.new }

View File

@ -1,4 +1,4 @@
RSpec.describe 'channel integration tests', edge: true, notravis: true do
RSpec.describe 'channel integration tests', edge: true do
let!(:examples_root) { File.expand_path(File.join(File.dirname(__FILE__), '../../../examples')) }
@ -65,7 +65,7 @@ STDOUT
expect(result).to eq expected
end
specify 'default-selection.rb', notravis: true do
specify 'default-selection.rb' do
(pending('flaky on JRuby'); fails) if Concurrent.on_jruby?
expected = <<-STDOUT
.

View File

@ -2,7 +2,7 @@ module Concurrent
class Channel
RSpec.describe Tick, edge: true, notravis: true do
RSpec.describe Tick, edge: true do
it 'initializes to current time when no argument given' do
allow(Concurrent).to receive(:monotonic_time).and_return(42)

View File

@ -1,6 +1,6 @@
module Concurrent
RSpec.describe Channel, edge: true, notravis: true do
RSpec.describe Channel, edge: true do
context 'initialization' do
@ -510,7 +510,7 @@ module Concurrent
context '#poll?' do
it 'returns a just Maybe immediately if available', notravis: true do
it 'returns a just Maybe immediately if available' do
subject # initialize on this thread
t = in_thread do
subject.put(42)
@ -557,7 +557,7 @@ module Concurrent
end
end
context 'goroutines', notravis: true do
context 'goroutines' do
let(:default_executor) { Channel.const_get(:GOROUTINES) }

View File

@ -1,6 +1,6 @@
module Concurrent
RSpec.describe 'configuration', notravis: true do
RSpec.describe 'configuration' do
context 'global executors' do

View File

@ -19,7 +19,7 @@ RSpec.describe Concurrent::Edge::LockFreeLinkedSet, edge: true do
expect(subject.add 'test string1').to be true
end
context 'in a multi-threaded environment', notravis: true do
context 'in a multi-threaded environment' do
it 'adds the items to the set' do
to_insert = %w(one two three four five six)
@ -85,7 +85,7 @@ RSpec.describe Concurrent::Edge::LockFreeLinkedSet, edge: true do
end
end
context 'in a multi-threaded environment', notravis: true do
context 'in a multi-threaded environment' do
it 'correctly check that the set contains the item' do
to_insert = %w(one two three four five six)
to_insert.each { |item| subject << item }
@ -127,7 +127,7 @@ RSpec.describe Concurrent::Edge::LockFreeLinkedSet, edge: true do
end
end
context 'in a multi-threaded environment', notravis: true do
context 'in a multi-threaded environment' do
it 'adds the items to the set' do
to_insert = %w(one two three four five six)

View File

@ -121,7 +121,7 @@ RSpec.shared_examples 'exchanger method cross-thread interactions' do
expect(get_value(second_value)).to eq :foo
end
it 'allows multiple firsts to cancel if necessary', notravis: true do
it 'allows multiple firsts to cancel if necessary' do
first_value = nil
second_value = nil
cancels = 3
@ -204,7 +204,7 @@ module Concurrent
if Concurrent.on_cruby?
specify 'stress test', notravis: true do
specify 'stress test' do
thread_count = 100
exchange_count = 100
latch = Concurrent::CountDownLatch.new(thread_count)

View File

@ -201,7 +201,7 @@ module Concurrent
end
end
context 'stress', notravis: true do
context 'stress' do
configurations = [
{ min_threads: 2,
max_threads: ThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE,

View File

@ -387,7 +387,7 @@ module Concurrent
expect(m.put(14)).to eq 14
end
it 'returns TIMEOUT on timeout on a full MVar', notravis: true do
it 'returns TIMEOUT on timeout on a full MVar' do
# TODO (pitr-ch 15-Oct-2016): fails on jruby
result = nil
in_thread { result = m.put(14, 0.3) }

View File

@ -2,7 +2,7 @@ Thread.abort_on_exception = true
module Concurrent
RSpec.describe 'MapTorture', stress: true, notravis: true do
RSpec.describe 'MapTorture', stress: true do
THREAD_COUNT = 40
KEY_COUNT = (((2**13) - 2) * 0.75).to_i # get close to the doubling cliff
LOW_KEY_COUNT = (((2**8 ) - 2) * 0.75).to_i # get close to the doubling cliff
@ -504,5 +504,5 @@ module Concurrent
expect(sum(cache.values)).to eq sum(result)
expect(options[:key_count]).to eq cache.size
end
end unless RUBY_ENGINE == 'rbx' || ENV['TRAVIS']
end unless RUBY_ENGINE == 'rbx'
end

View File

@ -2,14 +2,7 @@ if ENV['COVERAGE']
require 'simplecov'
require 'coveralls'
if ENV['TRAVIS']
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
else
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
SimpleCov.start do
project_name 'concurrent-ruby'