silverstripe / cwp-recipe-kitchen-sink

The CWP kitchen sink! Includes all optional and suggested modules. Used for internal testing.
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

MASTER/2.3: Unit test failures #18

Closed robbieaverill closed 5 years ago

robbieaverill commented 6 years ago

At time of writing (updated), these are the failing unit tests in the master branch (CWP 2.3.x-dev):

https://travis-ci.org/silverstripe/cwp-recipe-kitchen-sink/jobs/468593237

default testsuite

recipe-collaboration

There are no functional changes between the 2.2 branch and master at the moment, only the following modules added to composer.json:

+        "silverstripe/frameworktest": "dev-master",
+        "silverstripe/graphql-devtools": "1.x-dev",
+        "silverstripe/recipe-testing": "1.x-dev"

I suspect that frameworktest might be causing some of this.

recipe-content-blocks

robbieaverill commented 6 years ago

Regarding the setOwner() on null, I think it's related to the fact that advancedworkflow has a public $workflowService prop that is used for dependency injection. I've added public getter/setters in https://github.com/symbiote/silverstripe-queuedjobs/pull/222, but the bug won't be fixed there until we can reduce the visibility of that prop to protected (major semver change). The framework PR also fixes the error, and can be merged safely into a patch release. Originally caused by a regression I introduced with https://github.com/silverstripe/silverstripe-framework/pull/8465 but is fixed in https://github.com/silverstripe/silverstripe-framework/pull/8505.

I've updated the Fluent unit test so it is safer with the config props that it sets in https://github.com/tractorcow-farm/silverstripe-fluent/commit/d5a278e685b244f88efea632c0f2ab66e22c4c8e.

The subsites issue looks like some kind of global state bug. The test passes in isolation. Good times.

brynwhyman commented 5 years ago

Updated to remove reference to the subsite test failure (which doesn't appear to be happening on master)

robbieaverill commented 5 years ago

Oh yeah, we reverted the change in framework that was causing those test failures =D

Cheddam commented 5 years ago

I've raised an issue on the frameworktest module, as it's the custom GraphQL schema in this module that's causing the premature query issue: https://github.com/silverstripe/silverstripe-frameworktest/issues/59

Currently awaiting feedback from people with more knowledge on this front; this story is blocked until then.

robbieaverill commented 5 years ago

@Cheddam I'd suggest having a go at adding some "database is ready" checks to the GraphQL middleware and see if that fixes the issue. If there's any other feedback you need to unblock this issue please let me know and I'll have a closer look!

brynwhyman commented 5 years ago

Check out #24 when you're looking at this, there may be some related failures to backport to 2.2

robbieaverill commented 5 years ago

Once https://github.com/silverstripe/silverstripe-graphql/pull/208 is merged on green I'll re-run the remaining kitchen sink build that failed, then it's all green and we can close this

robbieaverill commented 5 years ago

Yay, all green: https://travis-ci.org/silverstripe/cwp-recipe-kitchen-sink/builds/485353029