From cc11c17b54783b6945717043dd9ac963ff9dd24a Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Thu, 5 Sep 2024 17:07:24 +0800 Subject: [PATCH] fixup --- .../gluten/test/VeloxBackendTestBase.java | 4 +- .../velox/VeloxListenerApiSuite.scala | 40 ------------------- 2 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 backends-velox/src/test/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApiSuite.scala diff --git a/backends-velox/src/test/java/org/apache/gluten/test/VeloxBackendTestBase.java b/backends-velox/src/test/java/org/apache/gluten/test/VeloxBackendTestBase.java index a026a2ee8f34..1cbaefba8fb8 100644 --- a/backends-velox/src/test/java/org/apache/gluten/test/VeloxBackendTestBase.java +++ b/backends-velox/src/test/java/org/apache/gluten/test/VeloxBackendTestBase.java @@ -38,12 +38,12 @@ public static void setup() { api.onDriverStart(mockSparkContext(), mockPluginContext()); } - public static SparkContext mockSparkContext() { + private static SparkContext mockSparkContext() { // Not yet implemented. return null; } - public static PluginContext mockPluginContext() { + private static PluginContext mockPluginContext() { return new PluginContext() { @Override public MetricRegistry metricRegistry() { diff --git a/backends-velox/src/test/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApiSuite.scala b/backends-velox/src/test/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApiSuite.scala deleted file mode 100644 index 2065132c1449..000000000000 --- a/backends-velox/src/test/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApiSuite.scala +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.gluten.backendsapi.velox - -import org.apache.gluten.test.VeloxBackendTestBase - -import org.scalatest.funsuite.AnyFunSuite - -class VeloxListenerApiSuite extends AnyFunSuite { - test("Unsupported arch") { - val arch = System.getProperty("os.arch") - System.setProperty("os.arch", "unknown-arch") - try { - val api = new VeloxListenerApi() - val error = intercept[RuntimeException] { - api.onDriverStart( - VeloxBackendTestBase.mockSparkContext(), - VeloxBackendTestBase.mockPluginContext()) - } - assert(error.getMessage.contains("FileNotFoundException")) - assert(error.getMessage.contains("unknown-arch/libgluten.so")) - } finally { - System.setProperty("os.arch", arch) - } - } -}