In #777168: Notice: Undefined property: stdClass::$uid in profile_user_presave() a new test named ProfileCrudTestCase has been created. This overlaps as namespace with ProfileCRUDTestCase provided by Profile2 making all tests against Profile2 crash.

Initial report

All my tests from http://drupal.org/node/1340878 are "postponed". The oldest one, http://qa.drupal.org/pifr/test/192739, is from "Mon, 11/14/2011 - 12:08:28".

It's true that after uploading that patch I switched the ticket manually back to "needs work" because I realized that I forgot to test first locally. Do I need to take some action? How?

Comments

claudiu.cristea’s picture

Title: Why are my tests postphoned? » Why are my tests postponed?
rfay’s picture

your patch tests are postponed because the branch doesn't test successfully. qa.drupal.org/pifr/test/54698

rfay’s picture

Status: Active » Fixed
claudiu.cristea’s picture

Status: Fixed » Active

What does this mean? Is there some documentation to understand what is a "branch test"? Is there something in my patch that makes that test fail?

rfay’s picture

No, the *branch* (the checked-in code) does not pass testing, so it doesn't make any sense to test the patch. You can work with the maintainer to solve the branch tests failing.

I have *just* deployed new code on drupal.org that will allow maintainers to see branch status right on drupal.org, but it has to be configured still. There the maintainer be able to request a branch retest and such. This will be enabled shortly.

Right now, you can go to your issue and follow the view details link over to qa.drupal.org. There you can click on the Branch Profile 2 - 7.x-1.x link to see what the testing results were for Profile 7.x-1.x (the branch, checked in). Then you can work with the maintainer to solve the problems there, check in new code, and go forward.

I've just requested a retest on Profile 7.x-1.x (http://qa.drupal.org/pifr/test/54698) in case it might pass now.

jthorson’s picture

Status: Active » Fixed

If the branch being tested does not pass without the patch, then the tests *with* the patch will most likely fail as well.

Because it's not starting from a known good state, the testbot can not determine whether the failure is due to the code in your patch, or an existing problem with your module ... and since it can not reliably determine if the patch should pass or fail, it refuses to actually test it.

To solve this, you need to get the code in the repository to a point where it passes all tests.

If you go to http://qa.drupal.org/pifr/test/54698, you can see which tests are failing. Anything in red or yellow needs to be addressed before you will be able to test individual patches successfully.

Each commit to your code will cause the code in the repository to be re-run (e.g. what we refer to as a 'branch test'); so there isn't anything special that you need to do other than fix the problems which are causing the existing tests to fail ... once the branch runs clean without any patches, then the system will (I believe) automatically start testing all of the postponed tests within your queue.

Hope this helps ... let me know if you could use further clarification!

claudiu.cristea’s picture

@rfay, @jthorson, Thank you both. I understand now the issue.

rfay’s picture

And... drum roll... @claudiu.cristea you can now see branch test results on the "Automated testing" tab of any project... http://drupal.org/node/623208/testing-status

claudiu.cristea’s picture

@rfay, Great UI improvement. Thanks!

rfay’s picture

It's all jthorson

jthorson++

claudiu.cristea’s picture

OK. Then credits goes to @jthorson :)

Still a problem:

If you go to http://qa.drupal.org/pifr/test/54698, you can see which tests are failing. Anything in red or yellow needs to be addressed before you will be able to test individual patches successfully.

I don't see any red or yellow at http://qa.drupal.org/pifr/test/54698. Is this from submitting for re-testing?

rfay’s picture

Have you run the tests manually? If you look at the log you'll see the description of why there was a total failure (which isn't usually the case). It looks to me like it's not possible to run Profile2's tests at this time.

[07:15:33] Command [/usr/bin/php ./scripts/run-tests.sh --concurrency 8 --php /usr/bin/php --url 'http://drupaltestbot699-mysql/checkout' --file sites/default/modules/profile2/profile2.test,sites/default/modules/og/og_migrate/og_migrate.test,sites/default/modules/og/og_access/og_access.test,sites/default/modules/og/og.test,sites/default/modules/og/tests/upgrade/og.upgrade.test --clean 2>&1] succeeded
  Duration: 1 seconds
  Directory: [/var/lib/drupaltestbot/sites/default/files/checkout]
  Completion status: [0]
  Output: [PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ProfileCRUDTestCase-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
    [:db_insert_placeholder_0] => ProfileCRUDTestCase
    [:db_insert_placeholder_1] => class
    [:db_insert_placeholder_2] => sites/default/modules/profile2/profile2.test
    [:db_insert_placeholder_3] => profile2
    [:db_insert_placeholder_4] => 0
)
 in _registry_parse_file() (line 179 of /var/lib/drupaltestbot/sites/default/files/checkout/includes/registry.inc).].
claudiu.cristea’s picture

Yes. Performed against latest 7.x-1.x, cloned with Git. Test only the Profile2 test and passed. Everything is green.

rfay’s picture

If you look in http://qa.drupal.org/pifr/test/54698 you'll see the various dependencies that were checked out (it tries for the most recent stable release). Try checking those out, just like it did, and see what results you get.

If that doesn't help, we can capture the result of a test run and then run manually on the testbot.

jthorson’s picture

Title: Why are my tests postponed? » Profile2 Branch test failure (Was: Why are my tests postponed?)
Status: Fixed » Active

That's definitely a non-standard failure ... I've triggered a retest to see if it happens again (versus it being some weird one-time event), since the previous test attempt had failed 'properly'.

claudiu.cristea’s picture

I see that a module from Profile2 - profile2_og_access - has Organic Groups as dependency. Is "branch testing" performing also branch tests of the dependencies? Because I just tested locally the branch from OG and has failed in some tests.

The question is: Does dependencies failures result in the main module test failure?

jthorson’s picture

The testing infrastructure is not intended to test dependencies as well, but that is something that we had seen occuring during some earlier testing. I believe the fix for this was included in the new 6.x-2.7 release.

However, that doesn't explain the current failures ... which was even more spectacular on the retest (no test review log?)

rfay’s picture

It's failing to install; it looks to me like with the implied dependencies there are two tests of the same name.

When things settle down on the testbots we'll force a retest and then take the testbot offline so we can run a manual test.

rfay’s picture

Well, I'm baffled. Whenever you try to enable profile2, or even clear the cache, you get the below. And there is nothing in the registry table that matches 'Profile%'. Even registry_rebuild can't get past that.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ProfileCRUDTestCase-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
    [:db_insert_placeholder_0] => ProfileCRUDTestCase
    [:db_insert_placeholder_1] => class
    [:db_insert_placeholder_2] => sites/default/modules/profile2/profile2.test
    [:db_insert_placeholder_3] => profile2
    [:db_insert_placeholder_4] => 0
)
 in _registry_parse_file() (line 179 of /var/lib/drupaltestbot/sites/default/files/checkout/includes/registry.inc).
rfay’s picture

Status: Active » Fixed

Here's the problem: #777168: Notice: Undefined property: stdClass::$uid in profile_user_presave() (http://drupalcode.org/project/drupal.git/775d4d) introduced a core test of the same name.

Probably time to namespace those tests better. If you run against latest D7, you'll see this fail.

rfay’s picture

Project: Drupal.org Testbots » Profile2
rfay’s picture

Status: Fixed » Active

But, of course, not fixed :-)

claudiu.cristea’s picture

Title: Profile2 Branch test failure (Was: Why are my tests postponed?) » Test namespace conflict
Assigned: Unassigned » claudiu.cristea
Priority: Normal » Critical

Great catch. Setting the appropriate title and priority.

claudiu.cristea’s picture

Project: Profile 2 » Profile2
Version: 7.x-1.x-dev »
StatusFileSize
new996 bytes

Here's a fix.

EDIT: The test from this patch cannot pass as the "branch test" will fail and will be postponed, sitting forever on "yellow". I tested locally and works, without the patch crashes.

claudiu.cristea’s picture

Project: Profile2 » Profile 2
Issue summary: View changes

Updated issue summary.

claudiu.cristea’s picture

Project: Profile2 » Profile 2
Version: » 7.x-1.x-dev
Status: Active » Needs review

It was set accidentally to a sandbox project.

rfay’s picture

Sadly, the fix has to be done before the patch can be tested.

claudiu.cristea’s picture

Yes, I added this in #24 .

jthorson’s picture

Version: » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

This patch will need to be committed before any profile2 patches will be testable .. including this one ...

So since the testbot isn't going to validate the test namechange patch, I'll go out on a limb and say that it's ready based on a visual review. :)

grasmash’s picture

It turns out that as as result of this, any module requiring Profile2 in its .info will also fail testing-- it never gets past Profile2 testing!

This patch looks good to me too! Let's get it committed.

RTBC.

jthorson’s picture

Hmmm ... so we're still running full tests on dependent modules? Can you note that and link to an example in the 'Testbot' project?

claudiu.cristea’s picture

This bug is critical, RTBC and... is obvious. Is blocking automated tests of all submitter patches. Can somebody commit it?

Thanks,
Claudiu

fago’s picture

Status: Reviewed & tested by the community » Fixed

ouch.. Thanks, committed.

joachim’s picture

Committed and pushed, minus the whitespace change.

rfay’s picture

And the branch tests pass now: http://drupal.org/node/623208/testing-status

Yay! Thanks, @claudiu.cristea

claudiu.cristea’s picture

Thank you @rfay and @jthorson it was your catch.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.