|
| 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 | +} |
0 commit comments