Patch #34169

MessagesControllerTest#test_post_new randomly fails

Added by Mizuki ISHIKAWA 12 months ago. Updated 12 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:


Category:Code cleanup/refactoring
Target version:4.2.0


MessagesControllerTest # test_post_new test fails (trunk)

MessagesControllerTest#test_post_new [/root/project/test/functional/messages_controller_test.rb:150]:
Expected: [""]
  Actual: [""]

bin/rails test test/functional/messages_controller_test.rb:121

There is no guarantee that the elements will be in the order of "first: author, second: member" in the array mails, so the test should be modified so that it does not depend on the order.

fix_test_post_new.patch Magnifier (732 Bytes) Mizuki ISHIKAWA, 2020-10-26 07:39

Associated revisions

Revision 20242
Added by Go MAEDA 12 months ago

MessagesControllerTest#test_post_new randomly fails (#34169).

Patch by Mizuki ISHIKAWA.

Revision 21242
Added by Marius BALTEANU 11 days ago

Fix random failing test introduced in r21130 (#35957, #34169).


#1 Updated by Go MAEDA 12 months ago

  • Subject changed from MessagesControllerTest#test_post_new fails to MessagesControllerTest#test_post_new randomly fails
  • Target version set to 4.2.0

Setting the target version to 4.2.0.

#2 Updated by vzvu 3k6k 12 months ago

LGTM and thanks for fixing. This test was very flaky on PostgreSQL and caused many false positive failures.

This fix will make development much easier.

#3 Updated by Go MAEDA 12 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

Also available in: Atom PDF