File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 before do
1717 allow ( Github ::PlanExecution ::Finished ) . to receive ( :new ) . and_return ( fake_finish_plan )
1818 allow ( fake_finish_plan ) . to receive ( :fetch_build_status )
19+ allow ( TimeoutExecution ) . to receive_message_chain ( :delay , :timeout ) . and_return ( true )
1920 end
2021
2122 describe 'Validates different Ci Job status' do
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ def app
3939 config . include FactoryBot ::Syntax ::Methods
4040 config . include WebMock ::API
4141
42+ config . add_formatter ( 'json' , 'tmp/rspec_results.json' )
43+
4244 pid = nil
4345
4446 config . before ( :suite ) do
Original file line number Diff line number Diff line change 7373 expect ( described_class . timeout ( check_suite . id ) ) . to be_falsey
7474 end
7575 end
76-
77- # context 'when timeout is called and rescheduled' do
78- # let(:check_suite) { create(:check_suite) }
79- #
80- # before do
81- # allow(CheckSuite).to receive(:find).and_return(check_suite)
82- # allow(check_suite).to receive(:finished?).and_return(true)
83- # end
84- #
85- # it 'calls timeout job' do
86- # expect(described_class.timeout(check_suite.id)).to be_falsey
87- # end
88- # end
8976end
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ def timeout(check_suite_id)
2323
2424 @logger . info ( "Calling Github::PlanExecution::Finished.new(#{ check_suite . bamboo_ci_ref } ).finished" )
2525
26- rescheduling ( finished , check_suite_id )
26+ rescheduling ( finished ( check_suite ) , check_suite_id )
2727 end
2828
29- def finished
29+ def finished ( check_suite )
3030 Github ::PlanExecution ::Finished
3131 . new ( { 'bamboo_ref' => check_suite . bamboo_ci_ref , hanged : true } )
3232 . finished
You can’t perform that action at this time.
0 commit comments