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):
File "./webtag_tests.py", line 758, in <module>
sys.exit(main())
File "./webtag_tests.py", line 754, in main
return unittest.main()
File "/usr/lib/python2.6/unittest.py", line 817, in __init__
self.runTests()
File "/usr/lib/python2.6/unittest.py", line 864, in runTests
result = testRunner.run(self.test)
File "/usr/lib/python2.6/unittest.py", line 753, in run
test(result)
File "/usr/lib/python2.6/unittest.py", line 464, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python2.6/unittest.py", line 460, in run
test(result)
File "/usr/lib/python2.6/unittest.py", line 464, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python2.6/unittest.py", line 460, in run
test(result)
File "/usr/lib/python2.6/unittest.py", line 300, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python2.6/unittest.py", line 270, in run
self.setUp()
File "./webtag_tests.py", line 88, in setUp
self.record_id = random_records()[0]
File "/usr/local/lib/python2.6/dist-packages/invenio/webtag_utils.py",
line 36, in random_records
(count,)))
File "/usr/local/lib/python2.6/dist-packages/invenio/dbquery.py",
line 233, in run_sql
rc = cur.execute(sql, param)
File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35,
in defaulterrorhandler
raise errorclass, errorvalue
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
--
Victor Engmark