Closed (fixed)
Project:
Project Issue File Review
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
29 Jun 2009 at 04:37 UTC
Updated:
21 Aug 2009 at 21:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
boombatower commentedSeems the script is the better route: #511020: Script to self-test pifr2 client. I like being able to run entire system while writing the code by turning on debug switch.
Any other thoughts on how to do this without loosing that ability?
Comment #2
deekayen commentedI don't understand what #511020: Script to self-test pifr2 client has to do with debug mode only running one set of tests. Just running the block tests isn't really "debugging", so much as development. I think the feedback debug mode provides should be standard logging functionality. If debug checkbox did something special, it would be to abbreviate the tests. As it is now, without debug mode turned on, it's harder to figure out why a test failed.
Comment #3
deekayen commentedThe situation that raised this issue is that people volunteered servers. When they turned them on, they checked Debug mode on the client configuration in the web interface, as did I. They rant it, and 5 minutes later it returned a successful self test and the client was enabled on the master. It didn't run all the tests and in most of the cases.
When debug mode was turned off, most people's clients didn't work anymore, they got frustrated, and gave up trying. We lost valuable log information as to why and/or it would fail on a different test in the series because the environment wasn't setup correctly with something like GD or clean URLs from mod_rewrite. Block tests alone won't catch a misconfiguration on the client server for testing GD related tests.
Comment #4
boombatower commentedThe test for this module needs to only run a single test and I do for dev. Lets go ahead and make it a "development flag" and make all the debug output standard.
Sound like a plan?
Comment #5
boombatower commentedpifr_debug() is used almost exclusively in pifr_server. as such I'll just change the only call in the client and then we can move on to: #514162: Log everything!
Comment #6
boombatower commentedSeems to be the only change required.
Comment #7
boombatower commentedCommitted.
Comment #8
deekayen commentedChange the checkbox title from Debug to Development, too?
Comment #9
boombatower commentedIt still prints debug stuff on server, and client now just always logs which seems best.
Comment #10
deekayen commentedKieran just got tricked by the debug checkbox again, too, and he's been working with it for weeks. I don't think #6 alone solves the problem of telling people that checkbox will only run partial tests.
Comment #11
Amazon commentedIn debug mode, I would expect to see a lot more logging to the watchdog.
What you get is: "pifr_client 07/12/2009 - 07:19 review.runTests() testingadmin"
Debug mode should either log a message that block tests were run successfully, or more obviously, all the tests classes should log messages to the watchdog so admins can see how far the tests ran.
If you want to keep debug mode, rename it to sample test mode or something more accurate.
Comment #12
boombatower commentedI'll just remove the checkbox from the settings page...and add more logging when tests run. I am really not sure how useful that is since you need to look in the assertions table anyway to see where it stopped and why. That shows you the test and reason.
Comment #13
boombatower commentedComment #14
boombatower commentedCommitted.
Comment #16
deekayen commentedThis is an absolutely evil checkbox. I just caught DamZ's client configuration with the debug checkbox turned on for the client he used to claim that #540386: sqlite not initializing tests was fixed, even though it had only run the block tests. Patch #13 isn't anywhere close to what #12 said.
Please just kill the checkbox dead, move it somewhere secret and out of the way, rename it to "YOU WILL KILL A KITTEN BY CLICKING THIS. SERIOUSLY - THE SPCA WILL BE NOTIFIED."
Comment #17
deekayen commentedApparently DamZ only wanted block tests. How about renaming it to "Just run the block tests"...
Comment #18
boombatower commentedYes, I explained to DamZ that he should turn that on so only it runs.
Comment #19
boombatower commentedIt is mainly for the master server, but he is more clarity. If we really must remove it that is fine, but I like being able to trigger it locally and when you just want to see if a client can even run tests (as in get that far).
Comment #20
boombatower commentedCommitted.