Closed (fixed)
Project:
Protected Node
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2015 at 11:15 UTC
Updated:
6 Sep 2015 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
grimreaperComment #2
grimreaperForgot to change issue status
Comment #3
izus commentedidk if someone is using it, but it may be interesting to keep it and fix it for people that use it in d6 version and that my want it in d7 too
why only one result ?
also i agree that we can mege a quick fix for the fork feature, but we should also start some testings for it in a new task (there is a lot of @todo in that file !!)
Comment #4
grimreaperWhy one result? I don't know as the db_query_range was not implemented correctly. It's a quick fix.
Yeah a lot of things to do, that's why I have proposed to delete if nobody is using it.
Ok about keeping the feature if we have tests for it.
Comment #5
grimreaperHello,
There is a patch that fix the fork feature and add tests for that.
@izus: Now I can answer you why one result. Because it is the node to which the user will be redirected.
Thanks for the review.
Comment #7
grimreaperHum I don't understand why the tests failed with the automated bot and not in my ocal environment.
If someone can test the last patch please.
Comment #10
izus commentedi have it working too locally, but we should find why it doesn't with d.o or all tests to come will fail :/
Comment #11
izus commentedHere is a patch that is only there for debugging
Please do not merge it or use it except for debugging do test robot.
actually it : deletes all tests except the one that is failing (so that test run very fast :))
so that we can some verbose and debug what test robots gets
Comment #13
izus commentedoups, this is the good patch
Comment #15
izus commentednow adding all the .fork.test tests.
Comment #17
grimreaperThanks for the tests Izus.
To help debugging the do automated tests, would it be better to merge the patch commenting the test that does not pass so it will be easier to review small patches ?
Comment #18
izus commentedhi yes it may be good to merge what works and le the issue open for debugging the test that fails
Comment #19
grimreaperOk, this is now merged.
Comment #21
grimreaperI suspect that it is the function to clear user session that does not work on the testbot. Let's see that.
Comment #23
grimreaperI don't understand why it is failing.
As said on: https://www.drupal.org/project/testbot
I test on simplytest.me, I test using the command line, I test without url rewriting. Each time it is ok.
And this is not a problem of clearing the session because there is a test on clearing session in protected_node.bulk.test and it is ok.
Hum... Maybe it is the way to format the URL of $this->drupalPost('protected-nodes', $form, t('OK'), array('query' => array('protected_pages' => $protected_pages)));
with $protected_pages = implode(',', array($node1->nid, $node2->nid));
Maybe on testbot the second nid is not well detected. I think of an improvement, in the function protected_node_get_nids_from_protected_pages_parameter() instead of manipulating $_GET, using the function drupal_get_query_parameters.
I will try that.
Comment #24
grimreaperComment #26
grimreaperOk That is not the problem.
I will try creating another user to access the second node in the test.
Comment #27
grimreaperComment #28
grimreapersending patch to testbot
Comment #31
izus commentedHi,
as suggested before, try merging the tests that work so that we have just little code to debug.
i personnaly think it is due to redirections.
i experienced once an issue like that but didn't give it time to be sure of the following hypothesis :
- May be, in some situations that i didn't digg into, d.o redirects to /checkout/foo/bar when you ask it to redirect to /foo/bar
Comment #32
grimreaperHello,
It is already merged.
Yeah, I know you had those problems :), like you I will try using xpath to know what the testbot landing page looks like.
If that did not success, maybe I will post an issue on the testbot project.
Comment #33
grimreaperWith that patch, we will know the title of the falling page.
Comment #35
grimreaperOk, so the user is on the password form. Let's see if it is in error.
Comment #37
grimreaperSo this time this assertion is green.
But this one is not. So The user has arrived to the node2 page. Whereas in the previous patch he/she can't... Strange.
Comment #38
grimreaperThis time as previously the user has arrived to node 2. The tests should be green.
Comment #41
grimreaperAh! the test is green has predicted.
So with the same tests, one time the testbot returns red and the other time it is green... I don't know how to be sure we can trust the testbot.
Comment #44
grimreaperComment #46
grimreaperComment #48
izus commentedjuste to confirm #31
=>
https://www.drupal.org/node/2481833#comment-9953891
:)
Comment #49
izus commentedactually one possible method to be close to testbot is running test locally on a "subfolder installed drupal": (i'm not sure it's the only difference here)
the vhsot servername as drupal.local
the vhsot documentroot is the the *parent* folder of drupal
and settings.php base_url as http://drupal.local/drupal
actually even in drupal 8 core code we can read :
"// Base path gives problems on the testbot, so $correct_link is hard-coded." (466 LanguageUILanguageNegociationTest.php)
!
Comment #50
grimreaperHello,
Thanks for the suggestion. I will try with Drupal installed as a subfolder.
But I don't want to spend more time on this because I think (hope) it will be solved with the new Drupal CI that will replace the testbot.
Comment #51
grimreaperHello,
The tests are green in local even with Drupal accessed as a subfolder.
Comment #52
grimreaperHello,
I consider the issue fixed. The problem with the test should fixed in https://www.drupal.org/node/2277045#comment-10092654
Thanks.
Comment #53
izus commentedidk why the testbot went ok, i guess it's related with news testbot deploy.
i just configured out tests frequency https://www.drupal.org/node/130911/qa
and run a test for 7.x branch
it fails on the fork feature
Comment #54
izus commentedComment #55
digitgopher commentedHand testing, it works. It is weird. Auto-testing locally, it fails intermittently. Around 50% of the time maybe. Sometimes I change the second parameter of
$this->drupalPost('admin/config/content/protected_node', array(), t('Clear sessions'));
to NULL, and that doesn't really make a difference.
Comment #56
grimreaperHello,
Thanks for the feedback. For me locally it works everytime (I need to check). Could you please give your configuration?
Comment #57
grimreaperNow every tests pass... Very very strange. I think I am becoming crazy...