Skip to content

Commit c6ca528

Browse files
author
druidliu
committed
Add backward test cases.
1 parent 45be5de commit c6ca528

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.apache.pulsar.tests.integration.backwardscompatibility;
20+
21+
import java.util.HashMap;
22+
import java.util.Map;
23+
import java.util.function.Supplier;
24+
import org.apache.pulsar.tests.integration.containers.BrokerContainer;
25+
import org.apache.pulsar.tests.integration.containers.PulsarContainer;
26+
import org.apache.pulsar.tests.integration.offload.TestBaseOffload;
27+
import org.testng.annotations.Test;
28+
29+
public class ClientOffloadTest3_0 extends TestBaseOffload {
30+
@Override
31+
protected Map<String, String> getEnv() {
32+
Map<String, String> result = new HashMap<>();
33+
result.put("managedLedgerMaxEntriesPerLedger", String.valueOf(getNumEntriesPerLedger()));
34+
result.put("managedLedgerMinLedgerRolloverTimeMinutes", "0");
35+
result.put("managedLedgerOffloadDriver", "filesystem");
36+
result.put("fileSystemURI", "file:///tmp");
37+
38+
return result;
39+
}
40+
41+
@Override
42+
protected void beforeStartCluster() throws Exception {
43+
super.beforeStartCluster();
44+
for (BrokerContainer brokerContainer : pulsarCluster.getBrokers()) {
45+
brokerContainer.setDockerImageName(PulsarContainer.PULSAR_3_0_IMAGE_NAME);
46+
}
47+
}
48+
49+
@Test(dataProvider = "ServiceAndAdminUrls")
50+
public void testPublishOffloadAndConsumeDeletionLag(Supplier<String> serviceUrl, Supplier<String> adminUrl)
51+
throws Exception {
52+
super.testPublishOffloadAndConsumeDeletionLag(serviceUrl.get(), adminUrl.get());
53+
}
54+
}

tests/integration/src/test/java/org/apache/pulsar/tests/integration/containers/PulsarContainer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public abstract class PulsarContainer<SelfT extends PulsarContainer<SelfT>> exte
5454
public static final String DEFAULT_IMAGE_NAME = System.getenv().getOrDefault("PULSAR_TEST_IMAGE_NAME",
5555
"apachepulsar/pulsar-test-latest-version:latest");
5656
public static final String DEFAULT_HTTP_PATH = "/metrics";
57+
public static final String PULSAR_3_0_IMAGE_NAME = "apachepulsar/pulsar:3.0.0";
5758
public static final String PULSAR_2_5_IMAGE_NAME = "apachepulsar/pulsar:2.5.0";
5859
public static final String PULSAR_2_4_IMAGE_NAME = "apachepulsar/pulsar:2.4.0";
5960
public static final String PULSAR_2_3_IMAGE_NAME = "apachepulsar/pulsar:2.3.0";

0 commit comments

Comments
 (0)