Sha256: be838152a6849a6b6b07242f940e66f41107b8afbbd7d047b2bd024a87b8a94f

Contents?: true

Size: 943 Bytes

Versions: 22

Compression:

Stored size: 943 Bytes

Contents

module DeepTest
  module Test
    class WorkUnit
      def initialize(test_case)
        @test_case = test_case
      end

      def run
        result = run_without_deadlock_protection 
        result = run_without_deadlock_protection if result.failed_due_to_deadlock?
        if result.failed_due_to_deadlock?
          result = WorkResult.new(@test_case.name)
          result.add_run
          result.output = "-deadlock-"
        end
        result
      end

      def ==(other)
        return false unless other.class == self.class
        @test_case == other.instance_variable_get(:@test_case)
      end

      def to_s
        @test_case.to_s
      end

      protected

      def run_without_deadlock_protection
        result = WorkResult.new(@test_case.name)
        output = capture_stdout do
          @test_case.run(result) {|channel,event|}
        end
        result.output = output
        result
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
jason-o-matic-deep_test-1.2.2.1 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.2 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.3 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.4 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.5 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.6 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.7 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.8 lib/deep_test/test/work_unit.rb
jason-o-matic-deep_test-1.2.2.9 lib/deep_test/test/work_unit.rb
jperkins-deep_test-1.2.2 lib/deep_test/test/work_unit.rb
deep_test_pre-2.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-2.0.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-1.4.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-1.3.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-1.2.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-1.1.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-1.0.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-0.2.0 lib/deep_test/test/work_unit.rb
jstorimer-deep-test-0.1.0 lib/deep_test/test/work_unit.rb
deep_test-1.2.1 lib/deep_test/test/work_unit.rb