Project

General

Profile

Actions

Defect #43441

closed

Fix failures in test/system/issues_test.rb

Added by Katsuya HIDAKA 1 day ago. Updated about 3 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The system tests on GitHub CI started failing a few days ago.
https://github.com/redmine/redmine/actions/runs/18994985869

Error excerpt:

Error:
IssuesSystemTest#test_removing_issue_shows_confirm_dialog:
Net::ReadTimeout: Net::ReadTimeout with "Net::ReadTimeout with #<TCPSocket:(closed)>" 
    vendor/bundle/ruby/3.4.0/gems/net-protocol-0.2.2/lib/net/protocol.rb:229:in 'Net::BufferedIO#rbuf_fill'

This likely began when Google Chrome was updated from version 140 to 142.
With Chrome 142, it seems the next test starts before the "removing issue shows confirm dialog" test has fully finished, which triggers the timeout.

Looking at the test, after clicking the delete button and accepting the confirm dialog, the test ends without waiting for the request to complete. I believe this is the root cause.

Current test:

test "removing issue shows confirm dialog" do
  log_user('jsmith', 'jsmith')
  visit '/issues/1'
  page.accept_confirm /Are you sure/ do
    first('#content span.icon-actions').click
    first('#content a.icon-del').click
  end
end

Patch 0002 adds an assertion that waits for the deletion request to complete, which makes the test pass reliably. I confirmed the tests passed three times in a row after applying the fix:
https://github.com/hidakatsuya/redmine/actions/runs/19121139829

Additionally, on ubuntu-latest , ImageMagick is not installed by default and a warning was shown. Patch 0001 adds the missing package to the test runner environment to remove the warning.


Files

Actions #1

Updated by Go MAEDA 1 day ago

  • Category set to Code cleanup/refactoring
  • Assignee set to Go MAEDA
  • Target version set to 5.1.11
Actions #2

Updated by Go MAEDA 1 day ago

  • Status changed from New to Resolved
  • Resolution set to Fixed

Committed the patches in r24129 and r24130. Thank you.

Actions #3

Updated by Go MAEDA about 3 hours ago

  • Status changed from Resolved to Closed

Merged the fix to stable branches.

Actions

Also available in: Atom PDF