Commit Graph

65 Commits

Author SHA1 Message Date
Felipe Lessa
3e33c58af0
Generalize session data (huge commit). 2015-05-31 11:07:23 -03:00
Felipe Lessa
821016a382 Remove outdated comment. 2015-05-30 11:03:52 -03:00
Felipe Lessa
34f55d571f Add workaround to fpco/stack#120. 2015-05-29 17:30:20 -03:00
Felipe Lessa
dc34513b3a First stab at a stack.yaml file. 2015-05-29 15:41:08 -03:00
Felipe Lessa
6324f2ddd5 Add single huge unit test to saveSession. 2015-05-29 00:56:09 -03:00
Felipe Lessa
823f992646 Tests for session invalidation. 2015-05-29 00:40:55 -03:00
Felipe Lessa
43b431a6c3 New support for timeout resolution optimization. 2015-05-28 17:07:57 -03:00
Felipe Lessa
b12b3e7cd1 Do not save empty sessions if possible. 2015-05-28 16:39:13 -03:00
Felipe Lessa
3757b4dad9 Test for nextExpires. 2015-05-28 16:04:30 -03:00
Felipe Lessa
ef0d3a707b Add note about limits to README. 2015-05-28 14:40:22 -03:00
Felipe Lessa
6895fbee4f Allow Redis to store sessions with more than 512k keys. 2015-05-28 14:34:47 -03:00
Felipe Lessa
faae95312a Use cereal for 2x improvement in time and space for persistent.
Now the peak memory usage of the persistent test suite sits at
2 GiB (752 MB max residency).  It also uses a lot less CPU time.
2015-05-28 13:34:45 -03:00
Felipe Lessa
11197f6180 Add note about SQL index. 2015-05-28 13:16:45 -03:00
Felipe Lessa
a35a10db0d Fewer stress tests but to the same effect. 2015-05-28 13:16:25 -03:00
Felipe Lessa
ec4623da34 Do not run large data tests in parallel.
Brings peak memory usage of the persistent test suite from 6 GiB to
4 GiB.  Still very bad, though.
2015-05-28 13:02:54 -03:00
Felipe Lessa
11bb9cafa4 Add storage tests for size and representation limits. 2015-05-28 12:08:00 -03:00
Felipe Lessa
1a28fc50dd Write more core tests, log mock operations. 2015-05-28 03:26:15 -03:00
Felipe Lessa
803aed691a Add note about Redis expires to main README. 2015-05-28 02:57:31 -03:00
Felipe Lessa
c9e080d5b8 Better time format for Redis serialization. 2015-05-28 02:44:46 -03:00
Felipe Lessa
ff6c0efaab Redis backend is all green. 2015-05-28 02:42:22 -03:00
Felipe Lessa
92fbee20da Fix copy-paste. 2015-05-28 02:23:00 -03:00
Felipe Lessa
bdd6db9e2a Do not lose precision when serializing UTCTime to Redis. 2015-05-28 02:20:17 -03:00
Felipe Lessa
7fdfd16216 Add test suite for redis backend.
Currently failing pretty badly. :(
2015-05-28 02:17:36 -03:00
Felipe Lessa
83faccf3f9 Use insertLookupWithKey when needing old value.
updateLookupWithKey returns original value only if it was deleted.  If
it was updated, it returns the updated value.  On both acid-state and
MockStorage we want the old value, though.

Now all acid-state tests are green once more.

MockStorage tests were already green because MockStorage does not
mantain a cached mapping of auth IDs to session IDs.
2015-05-28 02:03:12 -03:00
Felipe Lessa
172c3c01c4 Strenghten deleteAllSessionsOfAuthId's test even more. 2015-05-28 01:54:32 -03:00
Felipe Lessa
cebcea5bde Stricter test for deleteAllSessionsOfAuthId. 2015-05-28 01:33:37 -03:00
Felipe Lessa
9d33cb07aa Fix warning. 2015-05-28 01:33:21 -03:00
Felipe Lessa
8746b5eb4f Fix acid-state's implementation of {insert,replace}Session. 2015-05-28 01:28:07 -03:00
Felipe Lessa
82b7ebdca4 Fix example on how to use acid-state backend. 2015-05-28 01:27:40 -03:00
Felipe Lessa
b446b0ea92 Add storage tests for acid-state, both memory and local storage. 2015-05-28 01:27:13 -03:00
Felipe Lessa
80f121f57b Throw exceptions from persistent's {insert,replace}Session.
Now all tests are green for serversession-backend-persistent.
2015-05-28 00:48:44 -03:00
Felipe Lessa
8a6df8cc6c Add persistent storage tests to using SQLite and PostgreSQL.
Currently failing tests:

  1) SqlStorage on PostgreSQL insertSession throws an exception if a session already exists
  2) SqlStorage on PostgreSQL replaceSession throws an exception if a session does not exist
  3) SqlStorage on SQLite insertSession throws an exception if a session already exists
  4) SqlStorage on SQLite replaceSession throws an exception if a session does not exist
2015-05-28 00:38:49 -03:00
Felipe Lessa
b19ddd1922 Add storage tests to MockStorage, fix bugs that were found. 2015-05-27 23:43:04 -03:00
Felipe Lessa
83faa561c8 New collection of generic storage tests. 2015-05-27 23:42:30 -03:00
Felipe Lessa
adf97f5d07 Use atomicModifyIORef instead of readIORef.
<http://hackage.haskell.org/package/base-4.8.0.0/docs/Data-IORef.html#g:2>
2015-05-27 23:21:23 -03:00
Felipe Lessa
060187f997 New StorageException, clarify corner cases of storage methods. 2015-05-27 23:07:31 -03:00
Felipe Lessa
26d7aa5e47 Add more tests to the core. 2015-05-27 16:19:11 -03:00
Felipe Lessa
b7a063e1ee Add useful instances to some core structures. 2015-05-27 16:18:54 -03:00
Felipe Lessa
235bdc9a70 Initial work on test suites.
Bug fix from 9385651 was already a result of it.
2015-05-27 12:23:16 -03:00
Felipe Lessa
9385651dcd Base64 is case sensitive. 2015-05-27 11:25:51 -03:00
Felipe Lessa
2415e19316 Initial stab at serversession-frontend-wai. 2015-05-27 00:08:14 -03:00
Felipe Lessa
42e42f7f42 Typos. 2015-05-26 02:50:50 -03:00
Felipe Lessa
3a56d222a8
First stab at a Redis backend. 2015-05-26 02:23:33 -03:00
Felipe Lessa
95194a09ca Fix URL references. 2015-05-26 01:00:20 -03:00
Felipe Lessa
351edac473 Add "Limitations" to main README. 2015-05-26 00:58:20 -03:00
Felipe Lessa
01c79cd0b5 New serversession-frontend-snap package. 2015-05-26 00:53:38 -03:00
Felipe Lessa
15361007ec Fix yesod's createCookie's incomplete doc. 2015-05-26 00:52:49 -03:00
Felipe Lessa
c2bd20cd56 Add acid-state to main README, include better example of usage. 2015-05-25 22:09:25 -03:00
Felipe Lessa
591a525f53 Add note about versioning. 2015-05-25 21:47:13 -03:00
Felipe Lessa
bac54a5c70
New serversession-backend-acid-state package. 2015-05-25 21:31:47 -03:00