File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,8 @@ def _parse_atom_entry(entry):
256256 'links' : links ,
257257 'access' : metadata .access ,
258258 'fields' : metadata .fields ,
259- 'content' : content
259+ 'content' : content ,
260+ 'updated' : entry .get ("updated" )
260261 })
261262
262263
Original file line number Diff line number Diff line change @@ -341,21 +341,19 @@ def test_setttl(self):
341341 self .assertGreater (ttl , old_ttl )
342342
343343 def test_touch (self ):
344- # This cannot be tested very fast. touch will reset the ttl to the
345- # original value for the job, so first we have to wait just long enough
346- # for the ttl to tick down. Its granularity is 1s, so we'll wait a
347- # couple of seconds before we start.
348344 while not self .job .is_done ():
349345 pass
350346 sleep (2 )
351347 self .job .refresh ()
352- old_ttl = int ( self .job [ 'ttl' ])
348+ old_updated = self .job . state . updated
353349 self .job .touch ()
350+ sleep (2 )
354351 self .job .refresh ()
355- new_ttl = int (self .job ['ttl' ])
356- if new_ttl == old_ttl :
357- self .fail ("Didn't wait long enough for TTL to change and make touch meaningful." )
358- self .assertGreater (int (self .job ['ttl' ]), old_ttl )
352+ new_updated = self .job .state .updated
353+
354+ # Touch will increase the updated time
355+ self .assertLess (old_updated , new_updated )
356+
359357
360358 def test_search_invalid_query_as_json (self ):
361359 args = {
You can’t perform that action at this time.
0 commit comments