w@drupal great that you are working on this. I will commit some other issues soon (including #3055868: Delete entity load/delete wrappers) that will make changes to test files. It might be easier for you if you wait 2 or 3 weeks before starting this one.
w@drupal thanks for checking. Don't worry I hadn't forgotten. It's nearly the right time.
First I will offer @TR the chance to fix #3037140: Fix coding standards. He has been waiting longer, plus he says that the automatic tool to convert the test will work better if coding standards are fixed - so it should make your life easier. If he doesn't reply by 20th July that you can go. If he posts a patch it might be a little longer, but still soon. I suggest that you follow the other issue.
w@drupal OK to go ahead with fixing this one, many thanks.
I will try to avoid any other commits that change tests for as long as I can to save you from merging/re-rolls. But for sure if you can start soon then it will help.
OK no response here and another developer is keen to work on #3037140: Fix coding standards so let's do that one first. It should only be 1-2 weeks then can work on this one again.
This test fails phpunit --filter testSendFail "/app/web/modules/contrib/simplenews/tests/src/Functional/SimplenewsSendTest.php" but as I see from https://www.drupal.org/project/simplenews/issues/3053223 this is expected. Should we leave it as is?
That test is expected to fail against D8.7.2 but succeed against D8.8. I have set the default Drupal.org testing branch to D8.8 - provided that works we can commit.
Doesn't looks like a random. It's reproduces on the every local test running phpunit --filter testNewsletterIssueTranslation "/app/web/modules/contrib/simplenews/tests/src/Functional/SimplenewsI18nTest.php"
Thanks for your work on this patch, you clearly have made a lot of progress.
I think the problem is that you are calling \Drupal::service('cron')->run(); directly which means no URL is set and so simplenews_cron() calls simplenews_assert_uri() and it fails.
I suggest the fix is to keep the call $this->cronRun(); and add use CronRunTrait;
Comments
Comment #2
w.drupal commentedComment #3
adamps commentedw@drupal great that you are working on this. I will commit some other issues soon (including #3055868: Delete entity load/delete wrappers) that will make changes to test files. It might be easier for you if you wait 2 or 3 weeks before starting this one.
Comment #4
w.drupal commented@AdamPS ok, let me know when I can start
Comment #5
w.drupal commented@AdamPS, is it good time to start process this issue?
Comment #6
adamps commentedw@drupal thanks for checking. Don't worry I hadn't forgotten. It's nearly the right time.
First I will offer @TR the chance to fix #3037140: Fix coding standards. He has been waiting longer, plus he says that the automatic tool to convert the test will work better if coding standards are fixed - so it should make your life easier. If he doesn't reply by 20th July that you can go. If he posts a patch it might be a little longer, but still soon. I suggest that you follow the other issue.
Thanks!
Comment #7
adamps commentedw@drupal OK to go ahead with fixing this one, many thanks.
I will try to avoid any other commits that change tests for as long as I can to save you from merging/re-rolls. But for sure if you can start soon then it will help.
Comment #8
adamps commentedOK no response here and another developer is keen to work on #3037140: Fix coding standards so let's do that one first. It should only be 1-2 weeks then can work on this one again.
Comment #9
w.drupal commented@AdamPS i'm in progress with this issue. I think I'll finish this Friday
Comment #10
adamps commentedGreat news - in that case you have priority, thanks.
Comment #11
w.drupal commented@AdamPS
This test fails
phpunit --filter testSendFail "/app/web/modules/contrib/simplenews/tests/src/Functional/SimplenewsSendTest.php"but as I see from https://www.drupal.org/project/simplenews/issues/3053223 this is expected. Should we leave it as is?Comment #12
adamps commentedThat test is expected to fail against D8.7.2 but succeed against D8.8. I have set the default Drupal.org testing branch to D8.8 - provided that works we can commit.
Comment #13
w.drupal commentedI still have one failure:
Seems like emails don't appear in the "test_mail_collector" state after \Drupal::service('cron')->run();
Any ideas why?
Comment #14
adamps commentedThere are some random failures - I have scheduled a retest
Comment #15
w.drupal commentedDoesn't looks like a random. It's reproduces on the every local test running
phpunit --filter testNewsletterIssueTranslation "/app/web/modules/contrib/simplenews/tests/src/Functional/SimplenewsI18nTest.php"Comment #16
adamps commentedThere were two failures the first time it ran, and one was random so now only one.
Comment #17
adamps commentedThanks for your work on this patch, you clearly have made a lot of progress.
I think the problem is that you are calling
\Drupal::service('cron')->run();directly which means no URL is set and sosimplenews_cron()callssimplenews_assert_uri()and it fails.I suggest the fix is to keep the call
$this->cronRun();and adduse CronRunTrait;Comment #18
w.drupal commentedIndeed it is this problem. Fixed now
Comment #19
adamps commentedMany thanks looks good to me. I will commit after giving other maintainers a chance to review.
Comment #21
adamps commentedComment #22
adamps commentedComment #23
jcnventuraIt seeems this missed one test in modules/simplenews_demo/src/Tests/SimplenewsDemoTest.php
Comment #24
w.drupal commentedi've created child issue for this test. Patch will be uploaded there.
Comment #25
adamps commentedThanks in that case we can set this issue back to fixed.