You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Menshikov (JIRA)" <ji...@apache.org> on 2018/04/24 13:32:00 UTC
[jira] [Issue Comment Deleted] (IGNITE-6430)
CacheGroupsMetricsRebalanceTest.testRebalanceEstimateFinishTime test fails
periodically.
[ https://issues.apache.org/jira/browse/IGNITE-6430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Menshikov updated IGNITE-6430:
----------------------------------------
Comment: was deleted
(was: [~agura]
I have tried to reproduce the bug locally.
Test 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 at a calculation of *getEstimatedRebalancingFinishTime* (in class *CacheMetricsImpl*), we will see it equals to (if it's not a *-1L*):
{code:java}
((getKeysToRebalanceLeft() / rate) * REBALANCE_RATE_INTERVAL) + U.currentTimeMillis();
{code}
Where *rate* > 0, *getKeysToRebalanceLeft* >= 0, and *REBALANCE_RATE_INTERVAL* > 0.
So when *finishTime* > 0, it always not less than *U.currentTimeMillis()*.)
> 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)