You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2025/05/09 13:48:00 UTC

[jira] [Commented] (HIVE-28949) TestDbNotificationListener#createDatabase fails intermittently due to different createTime

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

Stamatis Zampetakis commented on HIVE-28949:
--------------------------------------------

The test is problematic cause it sets explicitly the creation time and it expects the same to be returned in the notification message. However, the HMS always overrides the createTime field during the creation of the database so the initial value is lost. Slight delays (more than 1 second) between the initialization of the test and the creation of the database are causing the test to fail. The test is more likely to fail in CI where delays are more common.

The fact that the user provided createTime is overriden by HMS is expected according to tests added by HIVE-21077.

> TestDbNotificationListener#createDatabase fails intermittently due to different createTime
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-28949
>                 URL: https://issues.apache.org/jira/browse/HIVE-28949
>             Project: Hive
>          Issue Type: Test
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>
> TestDbNotificationListener#createDatabase fails intermittently due differences in the "createTime" field of the database.
> {noformat}
> java.lang.AssertionError: expected:<Database(name:createdb, description:no description, locationUri:file:/home/jenkins/agent/workspace/hive-precommit_PR-5795/itests/hcatalog-unit/target/tmp/testDbNotif, parameters:{transient_lastDdlTime=1746610780}, ownerName:test_user, catalogName:hive, createTime:1746610780)> but was:<Database(name:createdb, description:no description, locationUri:file:/home/jenkins/agent/workspace/hive-precommit_PR-5795/itests/hcatalog-unit/target/tmp/testDbNotif, parameters:{transient_lastDdlTime=1746610780}, ownerName:test_user, catalogName:hive, createTime:1746610781)>
> 	at org.junit.Assert.fail(Assert.java:89)
> 	at org.junit.Assert.failNotEquals(Assert.java:835)
> 	at org.junit.Assert.assertEquals(Assert.java:120)
> 	at org.junit.Assert.assertEquals(Assert.java:146)
> 	at org.apache.hive.hcatalog.listener.TestDbNotificationListener.createDatabase(TestDbNotificationListener.java:365)
> {noformat}
> The expected createTime was *1746610780* but the actual createTime is *1746610781*.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)