Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Gitlab - Unit tests: Make sure interval is configurable #12

@jmgasper

Description

@jmgasper

From the recent review, we need to make sure that wait times in the tests are configured properly for maximum efficiency.

WAIT_TIME_MULTIPLIER should be in config, not in code

You should use setInterval to periodically check TC challenge api at a lower interval (like 10 seconds). When test success or fails after a configured max retry, then clear the interval handle and call done(). |  

Appeal Text:  Regarding the performance issue, how would you differentiate between a failed test and a test which takes a long time to complete? If a configured max retry is set, then the test always has to run that many times right? Isn’t that worse than waiting and making one call?I guess it only helps in cases where the test succeeds early.. |  

Response Text:  Most test cases succeeds, that's the normal case. So this way will help most of the normal cases.Your current test takes around one hour. With setInterval to periodically check, it can reduce to 20 ~ 30 mins.Following is some example I got:     

✓ ensures that the challenge is created properly in the Topcoder platform (33980ms)     
✓ ensures that the prize is updated properly on the TC challenge (13060ms)     
✓ ensures that the title is updated properly on the TC challenge (12905ms)     
✓ ensure that the description is updated properly on the TC challenge (535958ms)     
✓ ensures that the TC member is added to the TC challenge as expected (22665ms)     
✓ ensures that the TC member assignment is rolled back (11673ms)

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