Sha256: 10ae2c25595ff5dfd80c57d08732f3c75f53cb3e2b1541acd5d1ff01b9d5ce70

Contents?: true

Size: 761 Bytes

Versions: 24

Compression:

Stored size: 761 Bytes

Contents

module DeepTest
  module Spec
    class WorkResult
      attr_reader :identifier, :output

      def initialize(identifier, error, output)
        @identifier, @output = identifier, output
        @error = MarshallableExceptionWrapper.new error if error
      end

      def error
        @error.resolve if @error
      end

      def ==(other)
        identifier == other.identifier && 
            @error == other.instance_variable_get(:@error) 
      end

      def failed_due_to_deadlock?
        DeadlockDetector.due_to_deadlock?(@error)
      end

      def success?
        error.nil? || ::Spec::Example::ExamplePendingError === error
      end

      def deadlock_result
        WorkResult.new(identifier, nil, '-deadlock-')
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
jason-o-matic-deep_test-1.2.2.1 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.10 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.11 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.12 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.13 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.14 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.2 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.3 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.4 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.5 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.6 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.7 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.8 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.9 lib/deep_test/spec/work_result.rb
jperkins-deep_test-1.2.2 lib/deep_test/spec/work_result.rb
jason-o-matic-deep_test-1.2.2.15 lib/deep_test/spec/work_result.rb
jstorimer-deep-test-1.4.0 lib/deep_test/spec/work_result.rb
jstorimer-deep-test-1.3.0 lib/deep_test/spec/work_result.rb
jstorimer-deep-test-1.2.0 lib/deep_test/spec/work_result.rb
jstorimer-deep-test-1.1.0 lib/deep_test/spec/work_result.rb