From 2c1f80366d725046ca59c56a9bc12156b0fc3bc6 Mon Sep 17 00:00:00 2001 From: minwoox Date: Fri, 23 Aug 2024 15:55:36 +0900 Subject: [PATCH] Revert "Address the comment from @jrhee17" This reverts commit 6960f0ce9278e5775a70a62674ca801a19e0f6aa. --- .../internal/CreatingInternalGroupPlugin.java | 58 ------------------- ...linecorp.centraldogma.server.plugin.Plugin | 1 - 2 files changed, 59 deletions(-) delete mode 100644 xds/src/test/java/com/linecorp/centraldogma/xds/internal/CreatingInternalGroupPlugin.java delete mode 100644 xds/src/test/resources/META-INF/services/com.linecorp.centraldogma.server.plugin.Plugin diff --git a/xds/src/test/java/com/linecorp/centraldogma/xds/internal/CreatingInternalGroupPlugin.java b/xds/src/test/java/com/linecorp/centraldogma/xds/internal/CreatingInternalGroupPlugin.java deleted file mode 100644 index 2da37e022..000000000 --- a/xds/src/test/java/com/linecorp/centraldogma/xds/internal/CreatingInternalGroupPlugin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2024 LINE Corporation - * - * LINE Corporation 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: - * - * https://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 com.linecorp.centraldogma.xds.internal; - -import static com.linecorp.centraldogma.xds.internal.ControlPlanePlugin.XDS_CENTRAL_DOGMA_PROJECT; - -import java.util.concurrent.CompletionStage; - -import com.linecorp.armeria.common.util.UnmodifiableFuture; -import com.linecorp.centraldogma.common.Author; -import com.linecorp.centraldogma.server.command.Command; -import com.linecorp.centraldogma.server.plugin.AllReplicasPlugin; -import com.linecorp.centraldogma.server.plugin.PluginContext; -import com.linecorp.centraldogma.server.plugin.PluginInitContext; - -/** - * A plugin that creates an internal group before the control plane plugin starts. - * This is for checking the deadlock in the plugin initialization. - * See this comment. - */ -public final class CreatingInternalGroupPlugin extends AllReplicasPlugin { - - @Override - public void init(PluginInitContext pluginInitContext) { - pluginInitContext.commandExecutor() - .execute(Command.forcePush(Command.createRepository( - Author.SYSTEM, XDS_CENTRAL_DOGMA_PROJECT, "my-group"))) - .join(); - } - - @Override - public CompletionStage start(PluginContext context) { - return UnmodifiableFuture.completedFuture(null); - } - - @Override - public CompletionStage stop(PluginContext context) { - return UnmodifiableFuture.completedFuture(null); - } - - @Override - public Class configType() { - return getClass(); - } -} diff --git a/xds/src/test/resources/META-INF/services/com.linecorp.centraldogma.server.plugin.Plugin b/xds/src/test/resources/META-INF/services/com.linecorp.centraldogma.server.plugin.Plugin deleted file mode 100644 index db3aaf1e5..000000000 --- a/xds/src/test/resources/META-INF/services/com.linecorp.centraldogma.server.plugin.Plugin +++ /dev/null @@ -1 +0,0 @@ -com.linecorp.centraldogma.xds.internal.CreatingInternalGroupPlugin