[ 
https://issues.apache.org/jira/browse/OMID-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362275#comment-16362275
 ] 

ASF GitHub Bot commented on OMID-89:
------------------------------------

Github user ohadshacham commented on a diff in the pull request:

    https://github.com/apache/incubator-omid/pull/23#discussion_r167857492
  
    --- Diff: 
tso-server/src/test/java/org/apache/omid/tso/TestPersistenceProcessorHandler.java
 ---
    @@ -126,6 +126,36 @@ void afterMethod() {
             Mockito.reset(mockWriter);
         }
     
    +    @Test(timeOut = 1_000)
    +    public void testPersistentProcessorHandlerIdsAreCreatedConsecutive() 
throws Exception {
    +
    +        TSOServerConfig tsoConfig = new TSOServerConfig();
    +        tsoConfig.setNumConcurrentCTWriters(32);
    +
    +        PersistenceProcessorHandler[] handlers = new 
PersistenceProcessorHandler[tsoConfig.getNumConcurrentCTWriters()];
    +        for (int i = 0; i < tsoConfig.getNumConcurrentCTWriters(); i++) {
    +            handlers[i] = new PersistenceProcessorHandler(metrics,
    +                                                          "localhost:1234",
    +                                                          
mock(LeaseManager.class),
    +                                                          commitTable,
    +                                                          
mock(ReplyProcessor.class),
    +                                                          retryProcessor,
    +                                                          panicker);
    +        }
    +
    +        for (int i = 0; i < tsoConfig.getNumConcurrentCTWriters(); i++) {
    +            // Required to generalize the cases when other tests have 
increased the static variable assigning the ids
    +            if (i + 1 < tsoConfig.getNumConcurrentCTWriters()) {
    +                int followingHandlerIdAsInt = Integer.valueOf(handlers[i + 
1].getId());
    +                assertEquals(handlers[i].getId(), 
String.valueOf(followingHandlerIdAsInt - 1));
    --- End diff --
    
    We kind of testing the atomic integer :)


> Fix metrics in PersistenceProcesssorHandlers
> --------------------------------------------
>
>                 Key: OMID-89
>                 URL: https://issues.apache.org/jira/browse/OMID-89
>             Project: Apache Omid
>          Issue Type: Bug
>    Affects Versions: 0.8.2.0
>            Reporter: Francisco Perez-Sorrosal
>            Assignee: Francisco Perez-Sorrosal
>            Priority: Minor
>              Labels: handler, metrics, persistence, processor
>             Fix For: 0.9.0.0
>
>
> Currently all the processor handlers report to the same metrics output. 
> Separate the metrics of each handler to let each of them report individually 
> through a handler identifier.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to