deniskuzZ commented on code in PR #5891: URL: https://github.com/apache/hive/pull/5891#discussion_r2167051485
########## ql/src/test/org/apache/hadoop/hive/ql/udf/TestUDFUUID.java: ########## @@ -23,26 +23,41 @@ import org.apache.hadoop.hive.ql.exec.FunctionRegistry; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import org.junit.Test; +import java.util.concurrent.TimeUnit; + /** * TestUDFUUID. */ public class TestUDFUUID { @Test public void testUUID() throws Exception { UDFUUID udf = new UDFUUID(); - String id1 = udf.evaluate().toString(); String id2 = udf.evaluate().toString(); - assertFalse(id1.equals(id2)); - assertEquals(id1.length(), 36); assertEquals(id2.length(), 36); - GenericUDFBridge bridge = new GenericUDFBridge("uuid", false, UDFUUID.class.getName()); assertFalse(FunctionRegistry.isDeterministic(bridge)); } + + @Test + public void testUUIDv7() throws Exception { + UDFUUIDv7 udf = new UDFUUIDv7(); + String id1 = udf.evaluate(null).toString(); + TimeUnit.MILLISECONDS.sleep(1); Review Comment: @BsoBird why do you need sleep? please see https://sonarcloud.io/project/issues?impactSeverities=MEDIUM&sinceLeakPeriod=true&issueStatuses=OPEN%2CCONFIRMED&pullRequest=5891&id=apache_hive -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org