Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yongt9412 created an issue. See original summary.

johnchque’s picture

johnchque’s picture

The last submitted patch, 3: avoid_saving_more_than-2830533-3-test-only.patch, failed testing.

The last submitted patch, 3: avoid_saving_more_than-2830533-3-test-only.patch, failed testing.

Berdir’s picture

Status: Needs review » Needs work
+++ b/tests/src/Kernel/ParagraphsCompositeRelationshipTest.php
@@ -137,7 +137,9 @@ class ParagraphsCompositeRelationshipTest extends KernelTestBase {
     ]);
+    $paragraph3->setNeedsSave(TRUE);
     $paragraph3->save();
+    $this->assertFalse($paragraph3->needsSave());
     // Create another paragraph.

I'd prefer a separate test block, with a comment that explains what we are testing instead of stuffing it into some existing logic.

You can keep it in this test, just do it at the end.

johnchque’s picture

The last submitted patch, 7: avoid_saving_more_than-2830533-7-test-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 7: avoid_saving_more_than-2830533-7.patch, failed testing.

The last submitted patch, 7: avoid_saving_more_than-2830533-7-test-only.patch, failed testing.

The last submitted patch, 7: avoid_saving_more_than-2830533-7.patch, failed testing.

The last submitted patch, 7: avoid_saving_more_than-2830533-7-test-only.patch, failed testing.

The last submitted patch, 7: avoid_saving_more_than-2830533-7-test-only.patch, failed testing.

johnchque’s picture

Status: Needs work » Needs review

Yes, it works now.

miro_dietiker’s picture

Status: Needs review » Needs work

Committed, moooarrrr performance!

Still back to needs work as this fix should (also) be at ERR project in the corresponding trait.

johnchque’s picture

Status: Needs work » Fixed

Added to ERR in #2833102: Set needs save as False after saving an Entity we can set this issue as fixed and as soon as we get new versions we can remove what was added here.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.