/srv/irclogs.ubuntu.com/2012/10/26/#bzr.txt

jamlifeless: I have a question about using fixtures during testing. I'm playing around with having a service that gets brought up as a fixture, and it generates a log file.07:46
jamWhich I would like to add as a test detail, if the test fails.07:46
lifelessjam: cool07:48
jamhowever Fixture.setUp() doesn't have access to the test.07:48
jamSo do I just change the test code to do:07:48
jamf = self.useFixture(MyService); f.updateDetails(self)07:48
jamor is there some other useful way to have the fixture touch TestCase.addDetails ?07:48
mgzso, lp:rabbitfixture uses addDetail early with testtools.content.content_from_file07:49
jammgz: yeah, I missed the fact that fixtures *themselves* have an addDetail method.07:50
jamvs just TestCase having it.07:50
lifelessjam: so, TestCase.useFixture will automatically grab fixture details IIRC.07:50
jamthat wasn't particularly documented on: http://pypi.python.org/pypi/fixtures07:50
lifelessjam: you should just need to add whatever info you want to the fixtures details (during setUp - the actual content grab will be lazy)07:51
jamlifeless: right, addDetail('log', content_from_file(log_file)) looks like it will work, though I need to actually test it07:52
lifelessjam: looks like I need to document addDetail, could you file a bug pleasE?07:54
jamlifeless: what is the ordering between addCleanup(delete_the_file) and addDetail(..., content_from_file) ? Is addCleanup always run after detail collection?07:55
jamI'll file a bug07:55
jamlifeless: https://bugs.launchpad.net/python-fixtures/+bug/107164907:56
ubot5Ubuntu bug 1071649 in Python Fixtures "Document addDetail" [Undecided,New]07:56
lifelessjam: detail capturing run when an error is happening in the test framework07:58
lifelessjam: cleanup runs after an error is caught or the test ends normally07:59
lifelessrephrase07:59
lifelessdetail capturing runs when *reporting an outcome*07:59
lifelesscleanup runs after reporting outcomes or at test end07:59
lifelessthe nasty bit there is that the success outcome only happens after cleanup completed successfully08:00
lifelessso if you need logs etc for tests that pass (and you may want them - up to you :)) you need to stash stuff08:00
lifelessjam: TBH this stuff hasn't been polished - it was written, Just Worked, and we haven't reviewed it or had cause to spend more time on it (because it Just Worked :P)08:01
jamyeah, I don't need it right now. For failures is fine. Though interestingly it means you lose the 'shutdown' part of the log, since the cleanup to shutdown the server happens after the error that indicates you want to cleanup.08:01
jambut yes, it works quite well for my purpose.08:01
lifelesscool08:03
lifelessshiny stuff is shiny08:03
lifelessopenstack are just adopting this now08:03
lifelessbeginning of a learning curve for them on test effectiveness :)08:03
jamlifeless: yeah, I just wish this kind of goodness was already in go.08:07
jamIt looks like our team will be working on juju-core in the near future, and I'm noticing things like really-good testing infrastructure stuff.08:07
lifeless:)08:07
lifelessperhaps you can add it.08:07
jamyeah, a bit of 'as needed'. But always the "to do your simple problem X, first you need to implement all of Y and Z"08:08
jamlifeless: so fixture already seems to know about cleaning up state between test runs. Is there much to be gained to poke into testresources?08:09
jam(i imagine it mostly adds test organization to bring together similar resourced tests?)08:09
lifelessjam: right08:09
lifelessjam: FixtureResource will adapt a fixture for you08:10
lifelesspoo/win 6108:11
lifelessbah08:11
fullermdBetter than a poo/loss.  I think.08:13
fullermdlifeless: Incidentally, I was wondering the other day about that libcpuinfo you had.  Is that still live?08:42
lifelessfullermd: I haven't touched it, but it should still work09:13
lifelessfullermd: and I'll happily merge and review patches09:13
lifelessfullermd: (working code == no touch no more :))09:13
fullermdI noticed there's an outstanding merge request on it.09:13
lifelessoh09:14
lifelessI wish LP was better at showing me things like that09:14
lifelessjml filed a bug about that :P.09:14
fullermdSadly, nobody noticed the bug because LP didn't show them?   :p09:14
lifelessfullermd: I won't look at it tonight.09:14
lifelessfullermd: trolololol09:14
fullermdOh, no rush at all.  Just wondered it in passing a week or two ago.09:14
fullermdShould add a sysconf() method.  Early on, maybe; library calls are cheap.09:15
HanIf you want to forget your local changes and just update your branch to09:42
Hanmatch the remote one, use pull --overwrite.09:42
HanSo I run bzr pull --overwrite and guess what I get to see after bzr diff... :P09:43
HanHow do I really get the remote tree like it should be?09:43
vilaHan: the should read "If you want to forget your *committed* local changes"10:07
vilaHan: to get rid of your uncommitted local changes, use 'bzr revert'10:07
Hanarrrrr10:14
Hanvila, thanks10:19
=== yofel_ is now known as yofel
lamalexhello, is it possible to search through a tree's entire history?12:22
lamalexi'm trying to find a function and determine if it was removed, and there's no commit message indicating12:22
mgzlamalex: see bzr grep. it's built in to the latest development bzr, or available from lp:bzr-grep as a plugin for earlier versions12:23
jelmerlamalex:  I usually just grep through 'bar log -p' for that12:24
jelmer*bzr12:24
lamalexmgz, im trying to use bzr grep but it doesnt seem to run through my entire history (or is it and im just not realizing?)12:24
mgzthat relies on the nice person saying they removed function X in their commit message :)12:25
fullermdNot with -p it doesn't   :p12:25
mgzlamalex: see `bzr help grep` for details12:25
lamalexahh12:25
lamalex:)12:25
beunolamalex, also, bzr-search12:38
timourHello, I am experiencing the following problem while trying to revert a branch to a previous version:21:11
timourbzr push --overwrite21:11
timourConnection Timeout: disconnecting client after 300.0 seconds21:12
timourbzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.21:12
timourbzr 2.4.121:12
timourwith bzr 2.62b - same problem21:14
timourtried from different boxes in different countries21:14
timourSorry, forgot to mention that the tree I push to is on Launchpad.21:15
timourIs this some know problem with BZR or Launchpad?21:15
jelmertimour: can you connect to bazaar.launchpad.net with sftp?21:15
timourjelmer, will try now21:20
timourjelmer, yes, no problem21:21
timourjelmer, also please notice that I asked my colleague to try the same, he is an different country, different account21:22
timourjelmer, do need to know what is the source tree?21:22
jelmertimour: does e.g. "bzr ls lp:bzr" work?21:29
timourjelmer, yes21:29
jelmernot sure what's going on then21:30
timourjelmer, could it be something specific to this tree21:30
jelmertimour: if you run with -Dhpss, then ~/.bzr.log might help you see what's going on21:31
timourlp:maria/5.521:31
timourjelmer, ok, will try now21:31
timourjelmer, this is some of the interesting errors:21:41
timourooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://timour@bazaar.launchpad.net/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.21:41
timourthere is a call stack as well, not sure if anyone wants to see it here21:43
timourjelmer, thanks for the help, have to go to sleep. I pushed an 'undo' patch, which is the only solution ATM.21:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!