Skip to content

Commit

Permalink
Minor fixes to examples and integration test script
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsand-db committed Oct 12, 2023
1 parent 4f9c8b9 commit 2a67b66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions examples/scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def getMajorMinor(version: String): (Int, Int) = {
}
}
val lookupSparkVersion: PartialFunction[(Int, Int), String] = {
// versions 2.4.0 and above
case (major, minor) if (major == 2 && minor >= 4) || major >= 3 => "3.4.0"
// versions 3.0.0 and above
case (major, minor) if major >= 3 => "3.5.0"
// versions 2.4.x
case (major, minor) if major == 2 && minor == 4 => "3.4.0"
// versions 2.3.x
case (major, minor) if major == 2 && minor == 3 => "3.3.2"
// versions 2.2.x
Expand Down
8 changes: 4 additions & 4 deletions run-integration-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ def run_s3_log_store_util_integration_tests():
raise


def run_iceberg_integration_tests(root_dir, version, spark_version, iceberg_version, use_local):
def run_iceberg_integration_tests(root_dir, version, spark_version, iceberg_version, extra_maven_repo, use_local):
print("\n\n##### Running Iceberg tests on version %s #####" % str(version))
clear_artifact_cache()
if use_local:
run_cmd(["build/sbt", "publishM2"])

test_dir = path.join(root_dir, path.join("delta-iceberg", "integration_tests"))
test_dir = path.join(root_dir, path.join("iceberg", "integration_tests"))

# Add more Iceberg tests here if needed ...
test_files_names = ["iceberg_converter.py"]
Expand All @@ -224,7 +224,7 @@ def run_iceberg_integration_tests(root_dir, version, spark_version, iceberg_vers
"io.delta:delta-iceberg_2.12:" + version,
"org.apache.iceberg:iceberg-spark-runtime-{}_2.12:{}".format(spark_version, iceberg_version)])

repo = ""
repo = extra_maven_repo if extra_maven_repo else ""

for test_file in test_files:
try:
Expand Down Expand Up @@ -451,7 +451,7 @@ def __exit__(self, tpe, value, traceback):
if args.run_iceberg_integration_tests:
run_iceberg_integration_tests(
root_dir, args.version,
args.iceberg_spark_version, args.iceberg_lib_version, args.use_local)
args.iceberg_spark_version, args.iceberg_lib_version, args.maven_repo, args.use_local)
quit()

if args.run_storage_s3_dynamodb_integration_tests:
Expand Down

0 comments on commit 2a67b66

Please sign in to comment.