Caused by #2323721: [sechole] Link field item and menu link information leakage

There was 1 failure:

1) Drupal\Tests\Core\UrlTest::testCreateFromPath
Expectation failed for method name is equal to <string:matchRequest> when invoked at sequence index 2
Parameter 0 for invocation Symfony\Component\Routing\Matcher\RequestMatcherInterface::matchRequest(Symfony\Component\HttpFoundation\Request Object (...)) does not match expected value.
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
             'SERVER_PROTOCOL' => 'HTTP/1.1'
-            'REQUEST_TIME' => 1409560322
+            'REQUEST_TIME' => 1409560323
             'PATH_INFO' => ''
             'REQUEST_METHOD' => 'GET'
             'REQUEST_URI' => '/node/2/edit'
             'QUERY_STRING' => ''
         )
     )
     'files' => Symfony\Component\HttpFoundation\FileBag Object (...)
     'cookies' => Symfony\Component\HttpFoundation\ParameterBag Object (...)
     'headers' => Symfony\Component\HttpFoundation\HeaderBag Object (...)
     'content' => null
     'languages' => null
     'charsets' => null
     'encodings' => null
     'acceptableContentTypes' => null
     'pathInfo' => null
     'requestUri' => null
     'baseUrl' => null
     'basePath' => null
     'method' => null
     'format' => null
     'session' => null
     'locale' => null
     'defaultLocale' => 'en'
 )

/home/chx/www/d8/core/lib/Drupal/Core/Url.php:153

Example random fails

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new1.46 KB

This is one way.

dawehner’s picture

Issue tags: +Random test failure
StatusFileSize
new2.29 KB

Let's get the work done, we talked about in IRC.

chx’s picture

Title: Random test failure in Url::testCreateFromPath » Random test failures everywhere due to ->with(Request::create())
Status: Needs review » Needs work

Core tests:

  • UrlTest::testCreateFromRequestInvalid
  • ExternalUrlTest::testCreateFromRequest
  • TitleResolverTest::testDynamicTitle

Symfony tests:

  • InlineFragmentRendererTest::testRenderWithObjectsAsAttributes
  • InlineFragmentRendererTest::testRenderWithTrustedHeaderDisabled
  • ChainRouterTest::testMatchWithRequestMatchers
  • NestedMatcherTest::testNestedMatcher
  • NestedMatcherTest::testProviderNoMatch
dawehner’s picture

dawehner’s picture

Status: Needs work » Needs review

Nope, all other cases at least in core aren't valid. Those don't actually create a request in the code, so comparing those won't fail
because it is the same object.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Got it! Those others pass along the $request they created and not rely on some code to create another request object which causes these failures.

dawehner’s picture

Priority: Normal » Critical

Nope, random test failures are critical, I would say.

yesct’s picture

yesct’s picture

Issue summary: View changes

  • webchick committed f329675 on 8.0.x
    Issue #2330751 by dawehner, chx: Fixed Random test failures everywhere...
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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