#2503 closed defect (fixed)

Magic Folder: fix test_persistence

Reported by: dawuud Owned by: daira
Priority: normal Milestone: undecided
Component: code-frontend-magic-folder Version: 1.10.1
Keywords: sqlite persistence test Cc:
Launchpad Bug:

Description

Currently this test is broken because the magic-folder object is not auto created by the "no network grid" but instead manually instantiated... two different node directories are used. I attempted to fix this in my dev branch... however the current problem is that the magic-folder CLI tool doesn't use the correct node directory...

https://github.com/david415/tahoe-lafs/tree/2428.ignore-hidden-and-temp-files.0

Change History (7)

comment:1 Changed at 2015-09-12T12:06:20Z by dawuud

i've fixed the bug... now the initial creation of magic-folder object is done with the correct location of the clientdir which is used to generate the file path to the magic-folder db file.

https://github.com/david415/tahoe-lafs/tree/2428.ignore-hidden-and-temp-files.0

The next step is to fix the bug where the database commits seem to not persist...

comment:2 Changed at 2015-09-12T15:12:55Z by dawuud

made some progress with this test in the same dev branch... in particular this commit: """Fix bug in Downloader's _get_local_latest"""

It was previously always returning None...

Current status is that there's still bugs with this test; the version number gets incremented for file what1 when it should not.

comment:3 Changed at 2015-09-12T18:30:33Z by dawuud

more fixes in my dev branch... i now use a new db helper function to tell me if a file's mtime is the same as in the previously recorded mtime in the magic-folder db.

however... i demonstrate that things are still broken even though i fixed a bunch of bugs... because the test fails to actually upload a second file. the origins of this bug are unclear to me as i have not yet investigated.

comment:4 Changed at 2015-09-13T10:58:33Z by dawuud

The test_alice_bob test passes in my dev branch... so I've renamed it back. https://github.com/david415/tahoe-lafs/tree/2428.ignore-hidden-and-temp-files.0 b7cd4fd07de0954a37aac5542ed0219dd08a421b

The test_persistence test now fails only for MockTest? (passes for RealTest?)... and I should point out that this test only now fails because of the 2nd file upload I added to it... for some reason the processed hook deferred fires for the mock test when there wasn't an upload.

comment:5 Changed at 2015-09-14T20:24:27Z by daira

This now passes on https://github.com/tahoe-lafs/tahoe-lafs/tree/2428.ignore-hidden-and-temp-files.0. The problem was that the real Twisted INotify implementation was getting used by the replaced client for the mock test, even though the test had been set up to expect the fake INotify implementation (which has an additional event method). The error from trying to call the missing event method was hidden by debug-print code.

Last edited at 2015-09-14T20:25:03Z by daira (previous) (diff)

comment:7 Changed at 2015-09-17T06:29:57Z by dawuud

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.