diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-09-20 21:31:23 +0100 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-09-20 21:31:23 +0100 |
commit | 2cbdea2166057c3c3996e733d78048d528fa694e (patch) | |
tree | 9ce3c62ce763884772d482b4cee47b3a5781b837 /lib/backupstore | |
parent | df1a19ece5c1d308c4d08a694309592aa566611f (diff) |
Remove all timing dependency from test_ssl_keepalives().
This test has always been fragile, and usually fails on Travis for reasons
unknown, so replace the log parsing and intercepts with simple mocking code.
This doesn't cover 100% of what the old test did, including diff timer aborts
and the number of blocks used by the uploaded files, but it should be
completely robust.
Diffstat (limited to 'lib/backupstore')
-rw-r--r-- | lib/backupstore/BackupStoreFileEncodeStream.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/backupstore/BackupStoreFileEncodeStream.h b/lib/backupstore/BackupStoreFileEncodeStream.h index 6db09182..5b9b4a61 100644 --- a/lib/backupstore/BackupStoreFileEncodeStream.h +++ b/lib/backupstore/BackupStoreFileEncodeStream.h @@ -90,6 +90,9 @@ public: int64_t GetBytesToUpload() { return mBytesToUpload; } int64_t GetTotalBytesSent() { return mTotalBytesSent; } + static void CalculateBlockSizes(int64_t DataSize, int64_t &rNumBlocksOut, + int32_t &rBlockSizeOut, int32_t &rLastBlockSizeOut); + private: enum { @@ -98,15 +101,12 @@ private: Status_BlockListing = 2, Status_Finished = 3 }; - -private: + void EncodeCurrentBlock(); - void CalculateBlockSizes(int64_t DataSize, int64_t &rNumBlocksOut, int32_t &rBlockSizeOut, int32_t &rLastBlockSizeOut); void SkipPreviousBlocksInInstruction(); void SetForInstruction(); void StoreBlockIndexEntry(int64_t WncSizeOrBlkIndex, int32_t ClearSize, uint32_t WeakChecksum, uint8_t *pStrongChecksum); -private: Recipe *mpRecipe; IOStream *mpFile; // source file CollectInBufferStream mData; // buffer for header and index entries |