I've read the dependency issues, but it doesn't make sense to me that OG and Locale would have a problem.

The test: http://qa.drupal.org/pifr/test/218758

Core problem seems to be the languages table does not exist. I would call that the fault of my lack of familiarity with Localization, but my local system works through it just fine.

Comments

jthorson’s picture

The test in question ran on testbot 699, which is running the next PIFR release candidate instead of the 6.x-2.7 standard running on the other testbots. One of the patches included in this release is related to a Language/Langcode argument switch in D8.

If this is a test which used to pass and stopped working 'out of the blue', then it could be an issue with the testbot code ... in which case, I'll queue it up for retest on one of the other testbots to confirm.

You'll be able to tell if the retest ran on 699 or a different testbot by looking at line 3 of the review log. Testbot 699 will state Review host: (drupaltestbot699-mysql), while the other testbots will have no "Review host" entry.

jthorson’s picture

Errors still appeared on retest with a different testbot, so this is not unique to the codebase running on testbot 699.

rfay’s picture

That was being tested with the wrong branch, as I mentioned in the issue.

However, now that you've checked it in, you're still broken. http://qa.drupal.org/pifr/test/48098

So you'll have to figure this out.
It looks to me like locale is not being enabled by your tests. It needs to be enabled in your setUp().

The dependencies being used for 6.x-2.x-dev are:

$ drush pdsd og 6.x-2.x-dev
Array
(
    [1064026] => Array
        (
            [uri] => messaging
            [version] => 6.x-4.0-beta8
            [tag] => 6.x-4.0-beta8
        )

    [871044] => Array
        (
            [uri] => notifications
            [version] => 6.x-4.0-beta7
            [tag] => 6.x-4.0-beta7
        )

    [208375] => Array
        (
            [uri] => token
            [version] => 6.x-1.x-dev
            [tag] => 6.x-1.x
        )

    [1135590] => Array
        (
            [uri] => autoload
            [version] => 6.x-2.1
            [tag] => 6.x-2.1
        )

    [1341510] => Array
        (
            [uri] => views
            [version] => 6.x-3.0-rc3
            [tag] => 6.x-3.0-rc3
        )

)
jthorson’s picture

Looks like locale is being set up ...

function setUp() {
parent::setUp('og', 'locale');

Which doesn't explain the error ...
Table 'drupaltestbotmysql.languages' doesn't exist query: SELECT * FROM languages ORDER BY weight ASC, name ASC

Grayside’s picture

OG6 has no dependencies. Notifications & Views are not even referenced in any of the tests. So the list is a bit strange. Does the testing check/turn on all the submodules?

rfay’s picture

The testbot only *downloads* the discovered dependencies (which will be recursively discovered dependencies from any module in your project). Your test has to enable them with setUp() as necessary.

Grayside’s picture

Okay. So it's back to "Why doesn't Locale enable properly"?

Am I hearing that this is a bug in how the Testbot handles Language testing? Trying to determine where to emplace the Lever of Testing Success.

jthorson’s picture

If it's a testbot bug, it's local to your scenario ... we don't see this in the core i18n tests, for example.

I traced as far as determining the exceptions are tripped during the 'locale_add_language('es');' statement, on line 41 of og.language.test ... as well as confirming that module_exists('locale') returns TRUE during the testing.

I'm speculating that if you disable the locale module and completely uninstall it on your testing site, and then attempt to run the tests, you'll get the same exceptions as the testbot is getting. At that point, you should be able to debug further within your local environment.

Grayside’s picture

#346844: Clear language statics to remove locale module errors implies there is a fundamental problem and locale will always use the actual host db tables instead of the simpletest-generated tables.

Table 'd6_og.languages' doesn't exist

Table 'drupaltestbotmysql.languages' doesn't exist

In fact, it looks like efforts to get around problems with Locale module are cooked directly into the code of drupal_web_test_case.php:

    $module_list = module_list();
    if (isset($module_list['locale'])) {
      $this->originalModuleList = $module_list;
      unset($module_list['locale']);
      module_list(TRUE, FALSE, FALSE, $module_list);
    }

This implies there is really no reasonable fix. Is there a way to mark a test as not to be run by the testbot? My alternative is to turn off automated testing...

jthorson’s picture

Project: Drupal.org Testbots » Organic groups
Version: » 6.x-2.x-dev
Component: unexplained test failure » og.module

Note: Recommended renaming the ".test" file to ".test.disabled" in order to allow other testing.

As this is a trouble with simpletest itself, and not a testbot-specific issue, I'm going to move this over to the OG queue for now (with the task being to find a way around the simpletest limitations in order to re-enable the test) ... if you like, you can try pushing it to the simpletest queue for a fix instead, but based on the linked issue in #9, it looks like that angle has already been given considerable attention without a resolution.

rfay’s picture

Yes, there is a very ugly way to determine that a test is being run on the testbot. It's demonstrated in the Simpletest Example. See line 71 in simpletest_example.test:

    // We'll run this test normally, but not on the testbot, as it would
    // indicate that the examples module was failing tests.
    if (!$this->runningOnTestbot()) {
      // The debug() statement will output information into the test results.
      // It can also be used in Drupal 7 anywhere in code and will come out
      // as a drupal_set_message().
      debug('We are not running on the PIFR testing server, so will go ahead and catch the failure.');
      $this->drupalGet("node/{$node->nid}/edit");
      // Make sure we don't get a 401 unauthorized response:
      $this->assertResponse(200, t('User is allowed to edit the content.'));

      // Looking for title text in the page to determine whether we were
      // successful opening edit form.
      $this->assertText(t("@title", array('@title' => $settings['title'])), "Found title in edit form");
    }
  }

  /**
   * Detect if we're running on PIFR testbot; skip intentional failure in that
   * case. It happens that on the testbot the site under test is in a directory
   * named 'checkout' or 'site_under_test'.
   *
   * @return boolean
   *   TRUE if running on testbot.
   */
  public function runningOnTestbot() {
    return (file_exists("../checkout") || file_exists("../site_under_test"));
  }
}