PicoContainer
  1. PicoContainer
  2. PICO-149

[deployer] Optimize FolderContentPoller and implement test case without sleep

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      2

      Description

      FolderContentPoller had some unnecessary members and a method used only for test. By choosing a better lock guard and using interrupt states of the thread, these could be removed. Additionally the run method now notifies waiting threads and therefore the test can do without sleep.

        Activity

        Hide
        Jörg Schaible added a comment -

        Optimized version of FolderContentPoller.java

        Show
        Jörg Schaible added a comment - Optimized version of FolderContentPoller.java
        Jörg Schaible made changes -
        Field Original Value New Value
        Attachment FolderContentPoller.java.diff [ 11517 ]
        Hide
        Jörg Schaible added a comment -

        Test case without sleep. Note: It was the first time I worked with JMock. Therefore I reordered the "expected" lines to get a better understanding.

        Show
        Jörg Schaible added a comment - Test case without sleep. Note: It was the first time I worked with JMock. Therefore I reordered the "expected" lines to get a better understanding.
        Jörg Schaible made changes -
        Hide
        Jörg Schaible added a comment -

        Sorry for qualifying this issue as bug and without version info ... it's getting late.

        Show
        Jörg Schaible added a comment - Sorry for qualifying this issue as bug and without version info ... it's getting late.
        Hide
        Aslak Hellesøy added a comment -

        thanks!

        Show
        Aslak Hellesøy added a comment - thanks!
        Aslak Hellesøy made changes -
        Resolution Fixed [ 1 ]
        Assignee Aslak Hellesoy [ rinkrank ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Aslak Hellesøy
            Reporter:
            Jörg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: