Skip to:
Content

BuddyPress.org

Opened 3 months ago

Closed 2 weeks ago

#9214 closed enhancement (fixed)

Unit tests: Flaky membership controller test: `test_get_paginated_items`

Reported by: espellcaste's profile espellcaste Owned by: espellcaste's profile espellcaste
Milestone: 15.0.0 Priority: highest
Severity: normal Version:
Component: REST API Keywords: needs-patch needs-unit-tests
Cc:

Description (last modified by espellcaste)

Sometimes this test fails because the returned items order is not the same.

See: https://github.com/buddypress/buddypress/actions/runs/9967560534/job/27541438472?pr=337

See: https://github.com/buddypress/buddypress/actions/runs/9967560494/job/27541436153?pr=337

1) BP_Test_REST_Group_Membership_V1_Controller::test_get_paginated_items
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
    0 => 2015
    1 => 2016
    0 => 2012
    1 => 2013
    2 => 2017
 )

It's not clear to me why it fails sometimes. But let's make it more deterministic.

Change History (5)

#1 @espellcaste
3 months ago

  • Description modified (diff)
  • Summary changed from Unit tests: Membership controller test `test_get_paginated_items` is flaky to Unit tests: Flaky membership controller test: `test_get_paginated_items`

#2 @espellcaste
3 months ago

related to #9145

#3 @espellcaste
8 weeks ago

  • Priority changed from normal to high

#4 @espellcaste
8 weeks ago

  • Keywords needs-patch needs-unit-tests added
  • Priority changed from high to highest

#5 @espellcaste
2 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

This was resolved as part of #9145

Note: See TracTickets for help on using tickets.