[tor-bugs] #20489 [Metrics/CollecTor]: add tests for CollecTor
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Nov 3 09:38:19 UTC 2016
#20489: add tests for CollecTor
-------------------------------+--------------------------
Reporter: iwakeh | Owner: iwakeh
Type: enhancement | Status: assigned
Priority: Medium | Milestone:
Component: Metrics/CollecTor | Version:
Severity: Normal | Resolution:
Keywords: metrics-help | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------+--------------------------
Changes (by iwakeh):
* keywords: => metrics-help
Comment:
This is also a good task for getting acquainted with Metrics' development
and !CollecTor in particular as well as the !CollecTor file structure and
inner 'workings'.
One new test class `org.torproject.collector.sync.SyncManagerTest` should
be sufficient for the tests.
Some hints about how these new tests for !CollecTor could be implemented:
In general it should be sufficient to use test data already available from
`SyncPersistenceTest`. Using this data temporary folders for a 'remote'
recent and the local folders for syncing and storing could be created.
Using the create index functionality a SyncManager.merge run can be
started with this local index.json and syncing from the local(remote) test
folders.
What is to be tested:
Comment 82 of #18910 points out an error that a sync path is specified,
which is not offered in 'recent'. This can be tested by populating a test
'recent' folder using test data already available from
`SyncPersistenceTest` and verifying a sync-run.
Comment 95 of #18910 points out an error (solved in comment:98) where
sync-runs of different modules interfered. This could be tested by having
test-sync runs of different modules using the test data already available
from `SyncPersistenceTest` and verifying that one run doesn't change the
sync-folder from other module sync runs.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20489#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list