[users at bb.net] Need help with unit test failures and errors
Alvaro Erickson
alvaro.erickson at gmail.com
Tue Dec 27 23:54:04 UTC 2016
Greetings all,
I have updated the Buildbot source code which I have a fork of. Here are
the updates I made:
1. Updated the hgpoller module to look for changes in sub repos
2. Updated the data.changes module
3. Updated the db.changes module
4. Added 2 columns to the Changes table
And I am currently having problems trying to update the unit tests to
verify my code is correct. For example, I added the new column names to the
fakedb module. But, I am unsure what the format should be for the variable
and its value. Should it be the python variable name and value? Or the
database column and value?
So, here is one of my unit test failures:
Traceback (most recent call last):
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/unit/test_www_sse.py",
line 43, i
n test_listen
self.assertReceivesChangeNewMessage(self.request)
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/unit/test_www_sse.py",
line 110,
in assertReceivesChangeNewMessage
("changes", "500", "new"), test_data_changes.Change.changeEvent)
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/fake/fakemq.py",
line 58, in call
Consumer
validation.verifyMessage(self.testcase, routingKey, msg)
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/validation.py",
line 657, in
verifyMessage
(routingKey, (routingKey, message_)))
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/validation.py",
line 644, in
_verify
testcase.fail(msg)
twisted.trial.unittest.FailTest: changes message has unexpected keys '<new
Changes column 1>', '<new Changes column 2>'
buildbot.test.unit.test_www_sse.EventResource.test_listen
So, where do I add the new expected columns for the
buildbot.test.unit.test_www_sse.EventResource.test_listen to find?
Finally, here is an error I have:
Traceback (most recent call last):
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/sandbox/local/lib/python2.7/site-packages/twisted/inte
rnet/defer.py", line 1299, in _inlineCallbacks
result = g.send(result)
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/changes/hgpoller.py",
line 428, in _pr
ocessChanges
errortoo=False)
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/gpo.py",
line 78, in patched
_getProcessOutput
path=path)
File
"/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/gpo.py",
line 98, in patched
_getProcessOutputAndValue
% (bin, args))
twisted.trial.unittest.FailTest: got command hg [<hg command>] when no
further commands were expected
buildbot.test.unit.test_changes_hgpoller.HgPollerNoTimestamp.test_poll_initial
buildbot.test.unit.test_changes_hgpoller.TestHgPoller.test_poll_initial
In the hgpoller module, where should I put the my call to check for further
changes? Or the best way to solve the error?
Regards,
Alvaro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20161227/75df2419/attachment.html>
More information about the users
mailing list