[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-04-24 Thread Alexander Menshikov (JIRA)

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

Alexander Menshikov commented on IGNITE-6430:
-

[~agura]
I have tried to reproduce the bug locally.
It fails for me on another line:
{code:java}
assertTrue(finishTime > 0);
{code}

It can be fixed by code similar to the code above in the same test, like that:

{code:java}
waitForCondition(new PA() {
@Override public boolean apply() {
return 
ig2.cache(CACHE1).localMetrics().getEstimatedRebalancingFinishTime() != -1L;
}
}, 5_000);

long finishTime = 
ig2.cache(CACHE1).localMetrics().getEstimatedRebalancingFinishTime();
assertTrue(finishTime > 0);
{code}

With this fix, the test works fine for me.

Also, if we look to a calculation of *getEstimatedRebalancingFinishTime* (in 
class *CacheMetricsImpl*), we will see it equals to:

{code:java}
((getKeysToRebalanceLeft() / rate) * REBALANCE_RATE_INTERVAL) + 
U.currentTimeMillis();
{code}

Where rate > 0, getKeysToRebalanceLeft >= 0, and REBALANCE_RATE_INTERVAL > 0.

> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-04-24 Thread Alexander Menshikov (JIRA)

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

Alexander Menshikov commented on IGNITE-6430:
-

[~agura]
I have tried to reproduce the bug locally.
The test fails for me on another line:
{code:java}
assertTrue(finishTime > 0);
{code}
It can fix a code similar to the code a bit above in the same test with a 
*waitForCondition* method.

After that I got an assertion on this line:
{code:java}
assertTrue((U.currentTimeMillis() - startTime) > 0);
{code}
It happens when *U.currentTimeMillis() == startTime*. So the fix is trivial.

After fixing both of this troubles tests works fine for me (60 times passed).

I will leave it for the night running in a loop and will inform about the 
result.

> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-04-26 Thread Alexander Menshikov (JIRA)

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

Alexander Menshikov commented on IGNITE-6430:
-

[~agura]

After fixes described in last comment the test works fine: passed without any 
problem over than 600 times locally and 120 times on TC.
See [TC 
result|https://ci.ignite.apache.org/viewLog.html?buildId=1246058&buildTypeId=IgniteTests24Java8_Cache3&tab=testsInfo].

Also, I took a look at the calculation of *getEstimatedRebalancingFinishTime*.
And in brief *finishTime* always not less than *U.currentTimeMillis()* at some 
point in time when it was set if it's not a *-1L*. So after fixes, the test can 
fail with the assertion from a task description only when rebalancing truly 
took a lot of time.

I will clean PR and will update status when it becomes ready for merge.

> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-05-10 Thread Aleksey Plekhanov (JIRA)

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

Aleksey Plekhanov commented on IGNITE-6430:
---

[~sharpler], I've looked at your patch, changes looks good to me.

> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-05-10 Thread Alexander Menshikov (JIRA)

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

Alexander Menshikov commented on IGNITE-6430:
-

[~agura]
I have finished the task. Please review and merge if okay.
[~alex_pl]
Thanks for the review.


> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-05-11 Thread Dmitriy Pavlov (JIRA)

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

Dmitriy Pavlov commented on IGNITE-6430:


[~DmitriyGovorukhin], could you please take a look? I think you are more 
experienced than me in context of this test.

> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
> Fix For: 2.6
>
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-05-15 Thread Dmitriy Govorukhin (JIRA)

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

Dmitriy Govorukhin commented on IGNITE-6430:


[~dpavlov] Looks good for me, please merge.

> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
> Fix For: 2.6
>
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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


[jira] [Commented] (IGNITE-6430) CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails periodically.

2018-05-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-6430:


Github user asfgit closed the pull request at:

https://github.com/apache/ignite/pull/3914


> CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails 
> periodically.
> 
>
> Key: IGNITE-6430
> URL: https://issues.apache.org/jira/browse/IGNITE-6430
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Gura
>Assignee: Alexander Menshikov
>Priority: Major
>  Labels: MakeTeamcityGreenAgain
> Fix For: 2.6
>
>
> {{CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime}} test 
> fails periodically.
> {noformat}
> [2017-09-18 15:18:20,073][ERROR][main][root] Test failed.
> junit.framework.AssertionFailedError: Expected less 5000, Actual:-100969
> at junit.framework.Assert.fail(Assert.java:57)
> at junit.framework.Assert.assertTrue(Assert.java:22)
> at junit.framework.TestCase.assertTrue(TestCase.java:192)
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime(CacheGroupsMetricsRebalanceTest.java:261)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> After fix test should be unmuted on TC.



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