Hi Dave, Thank you for sharing these valuable information. I have added a merge request <https://forge-allura.apache.org/p/allura/git/merge-requests/269/>. Please review it and let me know any further improvements.
Regards! On Mon, Jul 16, 2018 at 9:54 PM Dave Brondsema <d...@brondsema.net> wrote: > On 7/16/18 9:49 AM, Deshani Geethika wrote: > > Hi Dave, > > > > I have tried with adding above lines, but still doesn't work. Can you > take > > a look at my implementation > > < > https://forge-allura.apache.org/u/deshani/allura-personal-dashboard/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477/ > > > > ? > > > > Thanks! > > > > Here's some debugging process I did, you can try it too: > > Tests use the MockSOLR class instead of a real solr instance (so that you > don't > need solr to run tests). I knew that, so I started by going to > MockSOLR.search() and putting in some print statements to debug it. At the > beginning of search() I added: > > print q > print fq > > And inside the "for obj in self.db.values():" loop, I added "print obj" > > My idea was to see what query is happening and what the stored objects > are, and > see what's not working. I ran just the single test with `nosetests > > allura.tests.functional.test_personal_dashboard:TestTicketsSection.test_tickets_section` > I noticed there was a 'project_id_s' in the search query, and there > shouldn't > be. But after a bit of trial & error to see what was happening, I > realized that > was coming from a "update_bin_count" background task, and that wasn't > related to > the test really. > > So I commented-out the tasks M.MonQTask.run_ready() to avoid all the > background > tasks for now and did it again, and there wasn't any of my print statements > occurring. So the dashboard ticket search wasn't even happening it seems. > > Then I printed the "response.html" variable to look at the whole dashboard > page > and I didn't see the Tickets section in it at all. So indeed, that section > isn't included in this test at all for some reason. > > Hopefully those are some helpful examples for this particular situation > and also > ideas for how to debug high level (like "is it even running?") and low > level (to > see where things might be not working). > > Next step of course is to figure out why in this test the dashboard section > isn't even running. I'll let you work on that. My general strategy is to > put > debugging in various places to confirm if things are running with the right > values, or where they aren't, and narrow down to the spot where it goes > wrong. > > > -- > Dave Brondsema : d...@brondsema.net > http://www.brondsema.net : personal > http://www.splike.com : programming > <>< > -- *Deshani Geethika* Undergraduate at Department of Computer Science and Engineering Faculty of Engineering - University of Moratuwa Sri Lanka LinkedIn <https://www.linkedin.com/in/deshanigeethika/> | GitHub <https://github.com/deshanigtk> | Mobile - +94776383034