Skip to content

Test with Siesta changed behavoir #153

Closed
@jordanpwood

Description

@jordanpwood

I have a test which exercises Siesta and the persistent cache that I wrote that Siesta uses. Today I noticed that this test is failing, when it used to work. In the test I setup a resource, call loadIfNeeded, then when I get a .newData with the event source .network (the actual network call uses URL mocking), I wipe the resource, and then wait for another .newData with a source of .wipe, then load the resource again. I expect this to get data from my cache which got populated by the first load. However, it seems that the resource is making a new request before the cache has returned a result. Is that expected? Is there supposed to be a race between the request and the cache hit, and I just got lucky before? If so, got any suggestions on how to change my test?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions