提交 370bfc39 编写于 作者: B Boyang Jerry Peng 提交者: xiaolong.ran

Fix couple functions related integration tests (#5434)

(cherry picked from commit 8a022064)
上级 f222dade
......@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pulsar.tests.integration.functions;
package org.apache.pulsar.tests.integration.cli;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
......@@ -24,19 +24,19 @@ import static org.testng.Assert.assertTrue;
import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.tests.integration.containers.WorkerContainer;
import org.apache.pulsar.tests.integration.docker.ContainerExecResult;
import org.apache.pulsar.tests.integration.functions.PulsarFunctionsTestBase;
import org.apache.pulsar.tests.integration.functions.utils.UploadDownloadCommandGenerator;
import org.apache.pulsar.tests.integration.suites.PulsarTestSuite;
import org.apache.pulsar.tests.integration.topologies.PulsarCluster;
import org.testng.annotations.Test;
@Slf4j
public class FunctionsCLITest extends PulsarTestSuite {
public class FunctionsCLITest extends PulsarFunctionsTestBase {
//
// Tests on uploading/downloading function packages.
//
public String checkUpload() throws Exception {
public String uploadFunction() throws Exception {
String bkPkgPath = String.format("%s/%s/%s",
"tenant-" + randomName(8),
"ns-" + randomName(8),
......@@ -59,8 +59,8 @@ public class FunctionsCLITest extends PulsarTestSuite {
}
@Test
public void checkDownload() throws Exception {
String bkPkgPath = checkUpload();
public void testUploadDownload() throws Exception {
String bkPkgPath = uploadFunction();
String localPkgFile = "/tmp/checkdownload-" + randomName(16);
UploadDownloadCommandGenerator generator = UploadDownloadCommandGenerator.createDownloader(
......
......@@ -26,6 +26,7 @@
<class name="org.apache.pulsar.tests.integration.cli.HealthcheckTest" />
<class name="org.apache.pulsar.tests.integration.compaction.TestCompaction" />
<class name="org.apache.pulsar.tests.integration.cli.AdminMultiHostTest"/>
<class name="org.apache.pulsar.tests.integration.cli.FunctionsCLITest"/>
</classes>
</test>
</suite>
<!--
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.
-->
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Pulsar Function State Integration Tests" verbose="2" annotations="JDK">
<test name="pulsar-function-state-test-suite" preserve-order="true" >
<classes>
<class name="org.apache.pulsar.tests.integration.functions.PulsarStateTest" />
</classes>
</test>
</suite>
......@@ -28,5 +28,6 @@
<suite-file path="./pulsar-sql.xml" />
<suite-file path="./pulsar-thread.xml" />
<suite-file path="./tiered-storage.xml" />
<suite-file path="./pulsar-function-state.xml" />
</suite-files>
</suite>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册