Commit Graph

10 Commits

Author SHA1 Message Date
Marius af0c1bf4ca Add test for complete upload notifications 2016-03-12 22:44:54 +01:00
Marius 0e750291c9 Use assertions library for tests 2016-01-20 16:40:19 +01:00
Marius f6a5530df8 Integrate LockingStore into UnroutedHandler
The reason behind this drastic move was that sometimes a lock needs to
persist across multiple calls to a DataStore. For example, when a PATCH
request is received, following behaviour is wanted:
	* Obtain lock (LockUpload)
	* Get offset, size etc (GetInfo)
	* Write data (WriteChunk)
	* Release lock (UnlockUpload)
However, before this change, the lock would be release and then obtained again
after the GetInfo and before the WriteChunk call. This resulted in an
inefficient resource usage and even a possible race condition.

The effects of this change was:
* FileLocker is now directly integrated into FileStore and not sperarated
* LockingStore and the entire package has been removed
* MemoryLocker has been moved into its very own package
2015-12-26 21:23:09 +01:00
Marius cfabbf5ffb Extract tests into tusd_test package 2015-12-25 22:33:27 +01:00
Max Brosnahan 98d8c939c2 Remove race in patch test 2015-11-10 22:16:01 -07:00
Naren Venkataraman 7898128700 Fix tests 2015-11-04 04:56:32 -05:00
Acconut 290fea5dac return new offset after successful PATCH request 2015-03-23 19:02:12 +01:00
Acconut 46fabad314 update header names 2015-03-23 18:15:05 +01:00
Acconut 2b66ccfd56 refactor tests using httpTest 2015-02-17 15:44:12 +01:00
Acconut 38794a4cf9 split handler test into multiple files 2015-02-09 19:37:06 +01:00