Uploaded image for project: 'REEF'
  1. REEF
  2. REEF-1537

LogicalTimer can cause a race condition in RuntimeClock

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: REEF-Common

      Description

      RuntimeClock has a concept of injectable timer, and in many unit tests, we use LogicalTimer to speed up the operations. Unfortunately, RuntimeClock still depends on the system timer internally: it uses Object.wait(time) calls in the event loop. That can cause race conditions when using LogicalTimer, e.g. in unit test ClockTest.testAlarmOrder()

      The solution would be to move the .wait() functionality into the logical timer and use that inside the RuntimeClock.

        Attachments

          Activity

            People

            • Assignee:
              motus Sergiy Matusevych
              Reporter:
              motus Sergiy Matusevych

              Dates

              • Created:
                Updated:

                Issue deployment