~nataliabidart/ubuntuone-client/use-sso-qt

« back to all changes in this revision

Viewing changes to tests/syncdaemon/test_offloadqueue.py

  • Committer: Tarmac
  • Author(s): facundo at com
  • Date: 2012-02-10 14:19:23 UTC
  • mfrom: (1188.2.6 aq-offload-queue)
  • Revision ID: tarmac-20120210141923-304q8yrs13iqy48o
Put exceeding ops in an offload queue, pick them up and execute them later when operations finish.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
 
101
101
    def _get_data(self, data='data'):
102
102
        """Return data to store and it's item size in disk."""
103
 
        pickled = pickle.dumps(data)
 
103
        pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
104
104
        item_size = len(pickled) + STRUCT_SIZE
105
105
        return data, item_size
106
106