From 95d95e3fb4631bd02cfa0853cb750b7f89df4377 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 16 Jun 2016 16:11:18 -0700 Subject: [PATCH] Try to get to the bottom of the sporradic test failures in testColumnExtendedPolicies() Summary: This test has been failing occasionally in a way that does not reproduce, and only when no one is looking at it. Try to add some extra assertions to maybe get more information. Test Plan: `arc unit` Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D16137 --- .../__tests__/PhabricatorProjectCoreTestCase.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php b/src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php index e157211f7b..b6d3aeebcf 100644 --- a/src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php +++ b/src/applications/project/__tests__/PhabricatorProjectCoreTestCase.php @@ -1099,6 +1099,18 @@ final class PhabricatorProjectCoreTestCase extends PhabricatorTestCase { $column = $this->refreshColumn($user, $column); $this->assertTrue((bool)$column); + // This test has been failing randomly in a way that doesn't reproduce + // on any host, so add some extra assertions to try to nail it down. + $board = $this->refreshProject($board, $user, true); + $this->assertTrue((bool)$board); + $this->assertTrue($board->isUserMember($user->getPHID())); + + $can_view = PhabricatorPolicyFilter::hasCapability( + $user, + $column, + PhabricatorPolicyCapability::CAN_VIEW); + $this->assertTrue($can_view); + $can_edit = PhabricatorPolicyFilter::hasCapability( $user, $column,