<div dir="ltr"><div><div><div><div><div><div><div>Greetings all,<br><br></div>I have updated the Buildbot source code which I have a fork of. Here are the updates I made:<br><br><ol><li>Updated the hgpoller module to look for changes in sub repos<br></li><li>Updated the data.changes module</li><li>Updated the db.changes module<br></li><li>Added 2 columns to the Changes table</li></ol><br>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?<br><br></div>So, here is one of my unit test failures:<br><br>Traceback (most recent call last):<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/unit/test_www_sse.py", line 43, i<br>n test_listen<br>    self.assertReceivesChangeNewMessage(self.request)<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/unit/test_www_sse.py", line 110, <br>in assertReceivesChangeNewMessage<br>    ("changes", "500", "new"), test_data_changes.Change.changeEvent)<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/fake/fakemq.py", line 58, in call<br>Consumer<br>    validation.verifyMessage(self.testcase, routingKey, msg)<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/validation.py", line 657, in<br> verifyMessage<br>    (routingKey, (routingKey, message_)))<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/validation.py", line 644, in<br> _verify<br>    testcase.fail(msg)<br>twisted.trial.unittest.FailTest: changes message has unexpected keys '<new Changes column 1>', '<new Changes column 2>'<br><br>buildbot.test.unit.test_www_sse.EventResource.test_listen<br><br></div>So, where do I add the new expected columns for the buildbot.test.unit.test_www_sse.EventResource.test_listen to find?<br><br></div>Finally, here is an error I have:<br><br>Traceback (most recent call last):<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/sandbox/local/lib/python2.7/site-packages/twisted/inte<br>rnet/defer.py", line 1299, in _inlineCallbacks<br>    result = g.send(result)<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/changes/hgpoller.py", line 428, in _pr<br>ocessChanges<br>    errortoo=False)<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/gpo.py", line 78, in patched<br>_getProcessOutput<br>    path=path)<br>  File "/srv/home/bobthebuilder/buildbothost/repositories/buildbot/master/buildbot/test/util/gpo.py", line 98, in patched<br>_getProcessOutputAndValue<br>    % (bin, args))<br>twisted.trial.unittest.FailTest: got command hg [<hg command>] when no further commands were expected<br><br>buildbot.test.unit.test_changes_hgpoller.HgPollerNoTimestamp.test_poll_initial<br>buildbot.test.unit.test_changes_hgpoller.TestHgPoller.test_poll_initial<br><br></div>In the hgpoller module, where should I put the my call to check for further changes? Or the best way to solve the error?<br><br></div>Regards,<br><br></div>Alvaro<br></div>