Skip to content

Commit

Permalink
#113 updating cacheService failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushant committed Sep 7, 2022
1 parent f458998 commit bee1592
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/groovy/au/org/ala/dashboard/CacheServiceSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ class CacheServiceSpec extends Specification implements ServiceUnitTest<CacheSe


def value = service.get('mykey', {null})

assert value == null
// The new value is refreshed asynchronously so the first attempt will always retrieve the old value
assert value == 'value'
// We wait for the refresher thread to finish
Thread.sleep(2000)
// We retrieve the updated value which is current and won't expired for at leas a day
// We retrieve the updated value which is current and won't expired for at least a day
value = service.get('mykey', {null})
then:
value == null
Expand Down

0 comments on commit bee1592

Please sign in to comment.