testInsertGetWithoutTimestamp testcase fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Running
python test/resonance-
I get one failed testcase
=======
FAIL: testInsertGetWi
-------
Traceback (most recent call last):
File "test/resonance
self.
AssertionError
-------
I would have fixed this if I were totally sure what the correct fix is. Right now the default timestamp of an event is an empty string, which is why this testcase fails. Is this the expected behaviour, and should we fix the test. Or should the default timestamp be a string containing the timestamp of object creation time?
Changed in zeitgeist: | |
milestone: | none → 0.3 |
Changed in zeitgeist: | |
status: | New → Triaged |
I think a nice default is to use the timestamp of object creation time. That was the idea behind the test at least, and indeed it also worked like that at some point (where the test worked). Otoh - the engine will use the current time as timestamp if the incoming event doesn't have one, so it might be nicer to leave it out...
That said - Having the engine assign timestamps does give a slight lag on the stamps though, so that's why I prefer having the client generated.
And just so that we are sure we agree; timestamps are millis since epoch, ie. int(time. time()* 1000). In the Event case it needs to be a string, so wrap a str() around that.