Skip to content

Commit 210b410

Browse files
committed
test: fix AS group references
1 parent e47bc01 commit 210b410

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

includes/reader-activation/sync/class-contact-sync.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ class Contact_Sync extends Sync {
3737
*/
3838
const RETRY_HOOK = 'newspack_contact_sync_retry';
3939

40-
/**
41-
* ActionScheduler group for integration sync retries.
42-
*/
43-
const RETRY_GROUP = 'newspack-contact-sync-retry';
44-
4540
/**
4641
* Maximum number of retries for a failed integration sync.
4742
*/

tests/unit-tests/data-events.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ public function test_dispatch_via_action_scheduler() {
552552
$pending = as_get_scheduled_actions(
553553
[
554554
'hook' => Data_Events::DISPATCH_AS_HOOK,
555-
'group' => Data_Events::DISPATCH_AS_GROUP,
555+
'group' => 'newspack',
556556
'status' => \ActionScheduler_Store::STATUS_PENDING,
557557
],
558558
'ARRAY_A'
@@ -684,7 +684,7 @@ public function test_handler_retry_scheduling() {
684684
$pending = as_get_scheduled_actions(
685685
[
686686
'hook' => Data_Events::HANDLER_RETRY_HOOK,
687-
'group' => Data_Events::HANDLER_RETRY_GROUP,
687+
'group' => 'newspack',
688688
'status' => \ActionScheduler_Store::STATUS_PENDING,
689689
],
690690
'ARRAY_A'
@@ -716,7 +716,7 @@ public function test_closure_handler_no_retry() {
716716
$pending = as_get_scheduled_actions(
717717
[
718718
'hook' => Data_Events::HANDLER_RETRY_HOOK,
719-
'group' => Data_Events::HANDLER_RETRY_GROUP,
719+
'group' => 'newspack',
720720
'status' => \ActionScheduler_Store::STATUS_PENDING,
721721
],
722722
'ARRAY_A'
@@ -819,7 +819,7 @@ public function test_max_retries_respected() {
819819
$pending = as_get_scheduled_actions(
820820
[
821821
'hook' => Data_Events::HANDLER_RETRY_HOOK,
822-
'group' => Data_Events::HANDLER_RETRY_GROUP,
822+
'group' => 'newspack',
823823
'status' => \ActionScheduler_Store::STATUS_PENDING,
824824
],
825825
'ARRAY_A'

tests/unit-tests/reader-activation-sync.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public function test_integration_retry_scheduling() {
327327
$pending = as_get_scheduled_actions(
328328
[
329329
'hook' => Contact_Sync::RETRY_HOOK,
330-
'group' => Contact_Sync::RETRY_GROUP,
330+
'group' => 'newspack',
331331
'status' => \ActionScheduler_Store::STATUS_PENDING,
332332
],
333333
'ARRAY_A'
@@ -370,7 +370,7 @@ public function test_integration_retry_success() {
370370
$pending = as_get_scheduled_actions(
371371
[
372372
'hook' => Contact_Sync::RETRY_HOOK,
373-
'group' => Contact_Sync::RETRY_GROUP,
373+
'group' => 'newspack',
374374
'status' => \ActionScheduler_Store::STATUS_PENDING,
375375
],
376376
'ARRAY_A'
@@ -413,7 +413,7 @@ public function test_integration_max_retries() {
413413
$pending = as_get_scheduled_actions(
414414
[
415415
'hook' => Contact_Sync::RETRY_HOOK,
416-
'group' => Contact_Sync::RETRY_GROUP,
416+
'group' => 'newspack',
417417
'status' => \ActionScheduler_Store::STATUS_PENDING,
418418
],
419419
'ARRAY_A'
@@ -451,7 +451,7 @@ public function test_integration_retry_invalid_data() {
451451
$pending = as_get_scheduled_actions(
452452
[
453453
'hook' => Contact_Sync::RETRY_HOOK,
454-
'group' => Contact_Sync::RETRY_GROUP,
454+
'group' => 'newspack',
455455
'status' => \ActionScheduler_Store::STATUS_PENDING,
456456
],
457457
'ARRAY_A'

0 commit comments

Comments
 (0)