-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set topic created by AoP could not be auto-deleted in GC. (#103)
### Motivation Fix [https://github.com/streamnative/aop/issues/72](https://github.com/streamnative/aop/issues/72) ### Modifications When a new topic created by AoP, set deleteWhileInactive in topic to false, so that the topic could not be included in GC.
- Loading branch information
Showing
4 changed files
with
38 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
amqp-impl/src/test/java/io/streamnative/pulsar/handlers/amqp/test/AmqpTopicManagerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Licensed 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 io.streamnative.pulsar.handlers.amqp.test; | ||
|
||
import io.streamnative.pulsar.handlers.amqp.AmqpTopicManager; | ||
import org.apache.pulsar.broker.PulsarService; | ||
import org.apache.pulsar.broker.service.AbstractTopic; | ||
import org.junit.Assert; | ||
import org.testng.annotations.Test; | ||
|
||
/** | ||
* Unit test for Pulsar Topic. | ||
*/ | ||
public class AmqpTopicManagerTest extends AmqpProtocolTestBase { | ||
|
||
@Test | ||
public void testDeleteWhileInactiveIsFalse() { | ||
PulsarService pulsarService = connection.getPulsarService(); | ||
AbstractTopic abstractTopic = (AbstractTopic) AmqpTopicManager.getOrCreateTopic(pulsarService, | ||
"public/vhost1/test", true); | ||
Assert.assertFalse(abstractTopic.isDeleteWhileInactive()); | ||
} | ||
} |
307 changes: 0 additions & 307 deletions
307
amqp-impl/src/test/java/io/streamnative/pulsar/handlers/amqp/test/mock/MockTopic.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters