Opened 2 years ago

Last modified 13 months ago

#20489 assigned enhancement

Add various tests for recently fixed issues

Reported by: iwakeh Owned by: metrics-team
Priority: Medium Milestone:
Component: Metrics/CollecTor Version:
Severity: Normal Keywords: metrics-help
Cc: iwakeh Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


For all issues fixed during system test of the sync-release (#18910):

  • verify that there are tests checking the fixed functionality (where it makes sense)
  • add tests to catch similar issues with junit test instead of system testing (where feasible)

At least for comments 82, 95, 98 in #18910.

Child Tickets

Change History (6)

comment:1 Changed 2 years ago by iwakeh

Owner: set to iwakeh
Status: newassigned

comment:2 Changed 2 years ago by iwakeh

Keywords: metrics-help added

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.

comment:3 Changed 2 years ago by iwakeh

Status: assignedaccepted

comment:4 Changed 21 months ago by iwakeh

Cc: iwakeh added

Adding myself to cc to make trac mail updates.

comment:5 Changed 17 months ago by karsten

Summary: add tests for CollecTorAdd various tests for recently fixed issues

Make an attempt to tweak the summary a bit.

comment:6 Changed 13 months ago by iwakeh

Owner: changed from iwakeh to metrics-team
Status: acceptedassigned

Move to metrics-team as these are not worked on by me during the next week.

Note: See TracTickets for help on using tickets.