org.eclipse.microprofile.metrics.tck.metrics

## Class ConcurrentGaugeFunctionalTest

- java.lang.Object
- - org.eclipse.microprofile.metrics.tck.metrics.ConcurrentGaugeFunctionalTest

    public class ConcurrentGaugeFunctionalTest
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`ConcurrentGaugeFunctionalTest()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `testConcurrentInvocations()` Over time, run multiple invocations on the bean (so that at one point, all are running at the same time).
`void` `testMinMax()` To test the 'min' and 'max' values we have to do this: - run invocation1 and keep it running - wait until the next minute starts - run invocation2 and stop it right away - wait until the next minute starts - stop invocation1 - after this, 'min' should be 1 and 'max' should be 2

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ConcurrentGaugeFunctionalTest

    public ConcurrentGaugeFunctionalTest()

### Method Detail

#### testMinMax

    @InSequence(value=1)
    public void testMinMax()
                                         throws TimeoutException,
                                                InterruptedException

To test the 'min' and 'max' values we have to do this: - run invocation1 and keep it running - wait until the next minute starts - run invocation2 and stop it right away - wait until the next minute starts - stop invocation1 - after this, 'min' should be 1 and 'max' should be 2

Throws:
  `TimeoutException`
  `InterruptedException`

#### testConcurrentInvocations

    @InSequence(value=2)
    public void testConcurrentInvocations()
                                                        throws InterruptedException,
                                                               TimeoutException

Over time, run multiple invocations on the bean (so that at one point, all are running at the same time). Over time, check that the concurrent gauge's value is updated properly. After that, start stopping the invocations one by one, and again, check that the concurrent gauge is updated.

Throws:
  `InterruptedException`
  `TimeoutException`