Drupal 8.1.0, with RefreshLess enabled:

PHPUnit 4.8.11 by Sebastian Bergmann and contributors.

E

Time: 1.32 minutes, Memory: 4.00Mb

There was 1 error:

1) Drupal\Tests\toolbar\FunctionalJavascript\ToolbarIntegrationTest::testToolbarToggling
Zumba\GastonJS\Exception\JavascriptError: One or more errors were raised in the Javascript code on the page.
            If you don't care about these errors, you can ignore them by
            setting js_errors: false in your Poltergeist configuration (see documentation for details).
AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /toolbar/subtrees/h44VigUWX0CKpfG-F2mSPWyAQ6j34qKtKGcs2os92wg
StatusText: Internal Server Error
ResponseText: {"message":"A fatal error occurred: SQLSTATE[42S02]: Base table or view not found: 1146 Table \u0027drupal.simpletest977695key_value\u0027 doesn\u0027t exist: SELECT 1 AS expression\nFROM \n{key_value} key_value\nWHERE ( (name = :db_condition_placeholder_0) AND (collection = :db_condition_placeholder_1) ); Array\n(\n    [:db_condition_placeholder_0] =\u003E system.theme.files\n    [:db_condition_placeholder_1] =\u003E state\n)\n"}
AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /toolbar/subtrees/h44VigUWX0CKpfG-F2mSPWyAQ6j34qKtKGcs2os92wg
StatusText: Internal Server Error
ResponseText: {"message":"A fatal error occurred: SQLSTATE[42S02]: Base table or view not found: 1146 Table \u0027drupal.simpletest977695key_value\u0027 doesn\u0027t exist: SELECT 1 AS expression\nFROM \n{key_value} key_value\nWHERE ( (name = :db_condition_placeholder_0) AND (collection = :db_condition_placeholder_1) ); Array\n(\n    [:db_condition_placeholder_0] =\u003E system.theme.files\n    [:db_condition_placeholder_1] =\u003E state\n)\n"}
    at http://localhost/core/misc/ajax.js?v=8.1.1:965 in error
    at http://localhost/core/misc/ajax.js?v=8.1.1:510 in complete
    at http://localhost/core/assets/vendor/jquery/jquery.min.js?v=2.1.4:2 in j
    at http://localhost/core/assets/vendor/jquery/jquery.min.js?v=2.1.4:2 in fireWith
    at http://localhost/core/assets/vendor/jquery/jquery.min.js?v=2.1.4:4 in x
    at http://localhost/core/assets/vendor/jquery/jquery.min.js?v=2.1.4:4

/var/www/html/vendor/jcalderonzumba/gastonjs/src/Browser/BrowserBase.php:119
/var/www/html/vendor/jcalderonzumba/gastonjs/src/Browser/BrowserBase.php:99
/var/www/html/vendor/jcalderonzumba/gastonjs/src/Browser/BrowserCookieTrait.php:54
/var/www/html/vendor/jcalderonzumba/mink-phantomjs-driver/src/SessionTrait.php:45
/var/www/html/vendor/jcalderonzumba/mink-phantomjs-driver/src/SessionTrait.php:37
/var/www/html/vendor/behat/mink/src/Session.php:78
/var/www/html/vendor/behat/mink/src/Mink.php:186
/var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:506

FAILURES!
Tests: 1, Assertions: 10, Errors: 1.

With RefreshLess disabled:

PHPUnit 4.8.11 by Sebastian Bergmann and contributors.

.

Time: 1.52 minutes, Memory: 4.00Mb

OK (1 test, 10 assertions)

My Questions

1. Is it true that SIMPLETEST_BASE_URL is supposed to be set to the URL that I can access my site with (i.e. the default profile) and then Simpletest module will know to serve the testing environment instead of the default environment?

2. What I don't understand is that since the test runs in a separate environment, why would enabling a module on the "default" profile affect tests?

Thanks!

CommentFileSizeAuthor
#29 2724813-29.patch1.05 KBalexpott
#29 27-29-interdiff.txt1.03 KBalexpott
#27 2724813-27.patch840 bytesalexpott
#26 2724813-26.patch2.2 KBalexpott
#25 postgres5.patch4.15 KBalexpott
#23 postgres4.patch3.18 KBalexpott
#21 postgres3.patch2.96 KBalexpott
#20 postgres2.patch2.89 KBalexpott
#19 postgres.patch2.62 KBalexpott
#18 postgres.patch624 bytesalexpott
#16 postgres.patch550 bytesalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ztl8702 created an issue. See original summary.

ztl8702’s picture

Category: Bug report » Support request
Issue summary: View changes
ztl8702’s picture

Project: RefreshLess » Drupal core
Version: 8.x-1.x-dev » 8.1.x-dev
Component: Code » simpletest.module
ztl8702’s picture

Issue summary: View changes
chx’s picture

Title: FunctionalJavascript/ToolbarIntegrationTest failed with Refreshless enabled » HEAD broken: FunctionalJavascript/ToolbarIntegrationTest failed with Refreshless enabled
Version: 8.1.x-dev » 8.2.x-dev
Category: Support request » Bug report
Priority: Normal » Critical
alexpott’s picture

Priority: Critical » Major

I don't think refreshless has to be enabled for this to happen. Is it a reliable fail with the refreshless module in the code base? Also this has been occurring for ages and I just can't see how this is critical. Annoying yes, but it's happening on a new and still experimental testing infrastructure and it's postgres. It's good to have an issue for this though.

tedbow’s picture

Title: HEAD broken: FunctionalJavascript/ToolbarIntegrationTest failed with Refreshless enabled » HEAD broken: FunctionalJavascript/ToolbarIntegrationTest failed

I get this error without refreshless in my code base.

tedbow’s picture

Title: HEAD broken: FunctionalJavascript/ToolbarIntegrationTest failed » HEAD broken: FunctionalJavascript/ToolbarIntegrationTest failed with Refreshless enabled

Sorry I was wrong. I am not getting same error.

dawehner’s picture

Yeah I don't think its related with refreshless to be honest, but rather somehow an issue with the testbot. I tried to run the test quite often locally and it continued to work without a random test failure :(

jibran’s picture

Title: HEAD broken: FunctionalJavascript/ToolbarIntegrationTest failed with Refreshless enabled » FunctionalJavascript/ToolbarIntegrationTest randomly fails on testbot
jibran’s picture

Title: FunctionalJavascript/ToolbarIntegrationTest randomly fails on testbot » ToolbarIntegrationTest randomly fails
jibran’s picture

Title: ToolbarIntegrationTest randomly fails » HEAD broken: ToolbarIntegrationTest fails
dawehner’s picture

@jibran
Did you checked which version of phantomjs is used on travsci? We updated to phantomjs 2 explicitly to fix failures which looked kinda similar.

jibran’s picture

Yes you are right @dawehner it was a version issue not it is passing fine https://travis-ci.org/jibran/drupal/builds/139106721

dawehner’s picture

Ha, life would have been too easy :)

alexpott’s picture

Title: HEAD broken: ToolbarIntegrationTest fails » ToolbarIntegrationTest fails randomly on postgres
Status: Active » Needs review
FileSize
550 bytes

Status: Needs review » Needs work

The last submitted patch, 16: postgres.patch, failed testing.

alexpott’s picture

alexpott’s picture

alexpott’s picture

alexpott’s picture

Status: Needs review » Needs work

The last submitted patch, 21: postgres3.patch, failed testing.

alexpott’s picture

alexpott’s picture

alexpott’s picture

alexpott’s picture

Discussed more with @dawehner and we felt that any JavascriptTestBase test could hit this - we need to wait for any AJAX activity to finished before tearing down.

Status: Needs review » Needs work

The last submitted patch, 27: 2724813-27.patch, failed testing.

alexpott’s picture

Improving the tear down so even if the waiting fails we don't get messages about the session table but something useful that points out what is happening.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php
@@ -34,6 +34,21 @@ protected function initMink() {
+    $result = $this->getSession()->wait(5000, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length))');

I agree of not using the assertion, its a tear down functionality here.

catch’s picture

+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php
@@ -34,6 +34,21 @@ protected function initMink() {
+    $result = $this->getSession()->wait(5000, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length))');
+    if (!$result) {
+      // Throw an exception to ensure errors are not obfuscated by missing
+      // session table errors.
+      throw new \RuntimeException('Unfinished AJAX requests whilst tearing down a test');
+    }

The comment is a bit confusing, here's a suggestion:

// If the wait is unsuccessful, there may still be an AJAX request in progress. If we tear down now, then this AJAX request may fail with missing database tables, because tear down will have removed them. Rather than allow it to fail, throw an explicit exception now explaining what the problem is.
alexpott’s picture

@catch that looks perfectly clear.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Fixed that comment on commit.

Committed/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!

  • catch committed 729f65a on 8.2.x
    Issue #2724813 by alexpott, dawehner, jibran, catch:...

  • catch committed b1e3676 on 8.1.x
    Issue #2724813 by alexpott, dawehner, jibran, catch:...

Status: Fixed » Closed (fixed)

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