diff --git a/BUILD b/BUILD index 2bc555ce8..5501090d5 100644 --- a/BUILD +++ b/BUILD @@ -138,7 +138,7 @@ py_library( py_test( name = "test_hive_lineage", - size = "small", + size = "enormous", srcs = ["hive-lineage/test_hive_lineage.py"], data = [ "hive-lineage/hive-lineage.sh", @@ -147,5 +147,6 @@ py_test( local = True, deps = [ "//integration_tests:dataproc_test_case", + "@io_abseil_py//absl/testing:parameterized", ], ) diff --git a/hive-lineage/hive-lineage.sh b/hive-lineage/hive-lineage.sh index 352bfce67..586d60a3d 100644 --- a/hive-lineage/hive-lineage.sh +++ b/hive-lineage/hive-lineage.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2015 Google LLC and contributors +# Copyright 2025 Google LLC and contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ function set_hive_lineage_conf() { function install_jars() { echo "Installing openlineage-hive hook" - gsutil cp -P "$INSTALLATION_SOURCE/hive-openlineage-hook-$HIVE_HIVE_OL_HOOK_VERSION.jar" "$HIVE_LIB_DIR/hive-openlineage-hook.jar" + gsutil cp -P "$INSTALLATION_SOURCE/hive-openlineage-hook-$HIVE_OL_HOOK_VERSION.jar" "$HIVE_LIB_DIR/hive-openlineage-hook.jar" } function restart_hive_server2_master() { diff --git a/hive-lineage/test_hive_lineage.py b/hive-lineage/test_hive_lineage.py index db329a466..60a06ddf2 100644 --- a/hive-lineage/test_hive_lineage.py +++ b/hive-lineage/test_hive_lineage.py @@ -1,8 +1,10 @@ from absl.testing import absltest +from absl.testing import parameterized from integration_tests.dataproc_test_case import DataprocTestCase class HiveLineageTestCase(DataprocTestCase): + COMPONENT = "hive-lineage" INIT_ACTIONS = ["hive-lineage/hive-lineage.sh"] TEST_SCRIPT_FILE = "hive-lineage/hivetest.hive" @@ -13,8 +15,15 @@ def __submit_hive_job(self, cluster_name): def verify_cluster(self, name): self.__submit_hive_job(name) + @parameterized.parameters( + 'STANDARD', + 'HA', + ) def test_hive_job_success(self, configuration): - self.createCluster(configuration, self.INIT_ACTIONS, scopes='cloud-platform') + self.createCluster(configuration, + self.INIT_ACTIONS, + timeout_in_minutes=30, + scopes='cloud-platform') self.verify_cluster(self.getClusterName())