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

Yussuf Shaikh commented on HIVE-16843:
--------------------------------------

The failure is due to the mocked class System returns 0 for call 
System.nanoTime().
In createDestinationPath() the mock should be on System.nanoTime() and not 
System.currentTimeMillis().

Also the destination DB name in expected path should be lower case.
Otherwise fails with:
  PrimaryToReplicaResourceFunctionTest.createDestinationPath:82
Expected: is 
"hdfs://somehost:9000/someBasePath/withADir/replicaDbName/somefunctionname/9223372036854775807/ab.jar"
     but: was 
"hdfs://somehost:9000/someBasePath/withADir/replicadbname/somefunctionname/9223372036854775807/ab.jar"




> PrimaryToReplicaResourceFunctionTest.createDestinationPath fails with 
> AssertionError
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-16843
>                 URL: https://issues.apache.org/jira/browse/HIVE-16843
>             Project: Hive
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 3.0.0
>         Environment: # cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=14.04
> DISTRIB_CODENAME=trusty
> DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
> # uname -a
> Linux 9efcdb4d8880 3.19.0-37-generic #42-Ubuntu SMP Fri Nov 20 18:22:05 UTC 
> 2015 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Yussuf Shaikh
>            Assignee: Yussuf Shaikh
>            Priority: Minor
>
> Stacktrace:
> java.lang.AssertionError: 
> Expected: is 
> "hdfs://somehost:9000/someBasePath/withADir/replicaDbName/somefunctionname/9223372036854775807/ab.jar"
>      but: was 
> "hdfs://somehost:9000/someBasePath/withADir/replicadbname/somefunctionname/0/ab.jar"
>       at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
>       at org.junit.Assert.assertThat(Assert.java:865)
>       at org.junit.Assert.assertThat(Assert.java:832)
>       at 
> org.apache.hadoop.hive.ql.parse.repl.load.message.PrimaryToReplicaResourceFunctionTest.createDestinationPath(PrimaryToReplicaResourceFunctionTest.java:82)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to