ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-15407) Fix ArtifactResourceProviderTest to avoid set ordering issues
Date Tue, 15 Mar 2016 16:12:33 GMT

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

Hudson commented on AMBARI-15407:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #4496 (See [https://builds.apache.org/job/Ambari-trunk-Commit/4496/])
AMBARI-15407. Fix ArtifactResourceProviderTest to avoid set ordering (rlevas: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=bc2719a77e57f0225d4575c43038629250a1f903])
* ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java


> Fix ArtifactResourceProviderTest to avoid set ordering issues
> -------------------------------------------------------------
>
>                 Key: AMBARI-15407
>                 URL: https://issues.apache.org/jira/browse/AMBARI-15407
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Robert Levas
>            Assignee: Robert Levas
>              Labels: unit-test
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-15407_trunk_01.patch
>
>
> Due to the inconsistent ordering of resources in the set of Resources created in {{org.apache.ambari.server.controller.internal.ArtifactResourceProvider#getResources}},
{{org.apache.ambari.server.controller.internal.ArtifactResourceProviderTest#testDeleteResources}}
fails since the test case expects a certain order in which the Resource are processed. 
> Since it doesn't really make a difference what order the resources are processed when
deleting, the test case should be fixed to not care about that. 
> The follow test failure has been encountered due to this:
> {noformat}
> java.lang.AssertionError: 
>   Unexpected method call ArtifactDAO.findByNameAndForeignKeys("test-artifact2", {cluster=500}):
>     ArtifactDAO.findByForeignKeys({cluster=500}): expected: 1, actual: 1
>     ArtifactDAO.findByNameAndForeignKeys("test-artifact", {cluster=500}): expected: 1,
actual: 0
> 	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:44)
> 	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:94)
> 	at org.easymock.internal.ClassProxyFactory$MockMethodInterceptor.intercept(ClassProxyFactory.java:97)
> 	at org.apache.ambari.server.orm.dao.ArtifactDAO$$EnhancerByCGLIB$$40076a34.findByNameAndForeignKeys(<generated>)
> 	at org.apache.ambari.server.controller.internal.ArtifactResourceProvider$4.invoke(ArtifactResourceProvider.java:377)
> 	at org.apache.ambari.server.controller.internal.ArtifactResourceProvider$4.invoke(ArtifactResourceProvider.java:365)
> 	at org.apache.ambari.server.controller.internal.AbstractResourceProvider.invokeWithRetry(AbstractResourceProvider.java:451)
> 	at org.apache.ambari.server.controller.internal.AbstractResourceProvider.modifyResources(AbstractResourceProvider.java:332)
> 	at org.apache.ambari.server.controller.internal.ArtifactResourceProvider.deleteResources(ArtifactResourceProvider.java:245)
> 	at org.apache.ambari.server.controller.internal.ArtifactResourceProviderTest.testDeleteResources(ArtifactResourceProviderTest.java:435)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message