On Tue, Feb 23, 2010 at 2:19 PM, Victor Engmark <[email protected]> wrote: > On Tue, Feb 23, 2010 at 1:50 PM, Samuele Kaplun <[email protected]> > wrote: >> In data martedì 23 febbraio 2010 13:11:37, Victor Engmark ha scritto: >>> I'm having some trouble running unit tests that modify the database - >>> They never seem to be able to do anything. Has anyone else seen this >>> error before? Its explanation >>> <http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html> >>> doesn't help much; >>> vengmark@pcgssi10:/opt/cds-invenio/lib/python/invenio$ grep >>> mysql_use_result * returned nothing. Also, >>> vengmark@pcgssi10:/opt/cds-invenio/var/log$ grep -i mysql * >>> returned only a lot of "Module _mysql was already imported" messages. >>> >>> vengmark@pcgssi10:~/src/cds-invenio/modules/webtag/lib (webtag)$ >>> ./webtag_tests.py --yes-i-know >>> ^CTraceback (most recent call last): >>> [...] >>> KeyboardInterrupt >>> Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of >>> sync; you can't run this command now") in <bound method Cursor.__del__ >>> of <MySQLdb.cursors.Cursor object at 0x8f1df8c>> ignored >> >> for the Out of sync error, in this case, it most probably due to the >> KeyboardInterrupt (caused by Ctrl-C) that you have hit. This normally causes >> an unexpected loss of connection with MySQL which translates into the Out of >> sync error. >> >> The "Module _mysql was already imported" messages are harmless (IMHO) and >> they >> happens on Ubuntu... > > OK, thanks! > >> For the exact explanation of why you can't run the unittest unfortunately I >> can't tell :-( I would need to see your particular file... > > This is the file: > <http://cdsware.cern.ch/repo/?p=personal/cds-invenio-vengmark.git;a=blob;f=modules/webtag/lib/webtag_tests.py;hb=webtag>. > When running it in IPython it says it runs 0 unit tests > successfully...
Now I've tried the following: 1. Dropped and recreated cdsinvenio schema with privileges to cdsinvenio@localhost. 2. Stopped apache. 3. Restarted MySQL. 4. Ran webtag_tests.py --yes-i-know. No luck - It's taking 60% CPU for minutes without any output. Normally it should be finished within 2 seconds. -- Victor Engmark
