Skip to content

Unit Tests Should Simulate Network Latency #22

@chriswsh

Description

@chriswsh

The way they're written, unit tests do not currently simulate network latency. They should, if only to test for improperly handled race conditions in higher-level modules.

[Aside: Because the calls to the event handlers are synchronous/blocking, it's possible that poorly written data modules could stall execution of server code for an indeterminate amount of time.

As far as making sure data sources put Promises into return.promises, my instinct is to make that explicit in the unit testing for the data sources themselves, and have a soft assert that all data modules which handle retrieve-parties and retrieve-party-events must do this. Am I missing anything here?]

(Edited: the functions don't return promises, they put them into the result.promises Array. Updated to reflect that.)

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