Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-8333

Create common test mocking ability for MetricsCollection

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 5.5.0
    • Fix Version/s: OpenIDM 5.5.0
    • Component/s: Performance
    • Labels:

      Description

      That same code snippet below is replicated thought modules that need a mocked MetricsCollector. Create a test metrics module that can share this code:

              metricsCollector = mock(MetricsCollector.class);
              timer = mock(Timer.class);
              when(timer.start()).thenReturn(timer);
              when(metricsCollector.getTimer(any(Name.class))).thenReturn(timer);
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joy.feng Joy Feng [X] (Inactive)
              Reporter:
              jason.vincent jason vincent
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: