Skip to content

Commit c0f9c0c

Browse files
committed
Disable parallel during travis CI
1 parent 32ba419 commit c0f9c0c

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

lib/octocatalog-diff/util/parallel.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ def initialize(opts = {})
5757
# @param logger [Logger] Optional logger object
5858
# @param parallelized [Boolean] True for parallel processing, false for serial processing
5959
# @return [Array<Parallel::Result>] Parallel results (same order as tasks)
60-
def self.run_tasks(task_array, logger = nil, parallelized = true)
60+
#
61+
# Note: Parallelization throws intermittent errors under travis CI, so it will be disabled by
62+
# default for integration tests.
63+
def self.run_tasks(task_array, logger = nil, parallelized = !ENV.key?('OCTOCATALOG_DIFF_TRAVIS_CI_DISABLE_PARALLEL'))
6164
# Create a throwaway logger object if one is not given
6265
logger ||= Logger.new(StringIO.new)
6366

spec/octocatalog-diff/integration/integration_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ def self.integration(options = {})
115115
options[:parallel] = false if ENV['COVERAGE']
116116
options[:INTEGRATION] = true
117117

118+
# Disable parallel under travis CI
119+
ENV['OCTOCATALOG_DIFF_TRAVIS_CI_DISABLE_PARALLEL'] = 'true' if ENV['TRAVIS']
120+
118121
# Run octocatalog-diff CLI method. Capture stdout and stderr using 'strio'.
119122
logger, logger_string = OctocatalogDiff::Spec.setup_logger
120123
begin

0 commit comments

Comments
 (0)