Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mod_ci/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def delete_expired_instances(compute, max_runtime, project, zone, db, repository
test = Test.query.filter(Test.id == test_id).first()
message = "Could not complete test, time limit exceeded"
progress = TestProgress(test_id, TestStatus.canceled, message)
g.db.add(progress)
g.db.commit()
db.add(progress)
db.commit()

gh_commit = repository.get_commit(test.commit)
if gh_commit is not None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ci/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def test_delete_expired_instances(self, mock_get_running_instances, mock_update_
{'status': "PENDING"}
]
compute.zoneOperations.return_value.get.return_value.execute = pendingOperations.pop
delete_expired_instances(compute, 120, 'a', 'a', None, MagicMock())
delete_expired_instances(compute, 120, 'a', 'a', MagicMock(), MagicMock())
mock_get_running_instances.assert_called_once()
mock_update_github_status.assert_called_once()

Expand Down