From ffdb94854fe3843745e722d17c587850a8a54858 Mon Sep 17 00:00:00 2001 From: heliang666s <147408835+heliang666s@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:39:46 +0800 Subject: [PATCH] remove mesh-router samples to spi-samples (#1196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove mesh-router samples to spi-samples * fix ci * fix ci --------- Co-authored-by: 何亮 --- .../case-configuration.yml | 68 -------- .../case-versions.conf | 25 --- .../dubbo-samples-meshrule-router/pom.xml | 150 ------------------ .../samples/governance/BasicConsumer.java | 37 ----- .../samples/governance/BasicProvider.java | 36 ----- .../samples/governance/BasicProvider2.java | 36 ----- .../dubbo/samples/governance/RuleUtil.java | 82 ---------- .../samples/governance/api/DemoService.java | 26 --- .../governance/impl/DemoServiceImpl.java | 30 ---- .../governance/impl/DemoServiceImpl2.java | 30 ---- .../resources/dubbo-routers-mesh-rule.yml | 51 ------ .../src/main/resources/log4j2.xml | 29 ---- .../resources/spring/dubbo-demo-consumer.xml | 36 ----- .../resources/spring/dubbo-demo-provider.xml | 43 ----- .../resources/spring/dubbo-demo-provider2.xml | 42 ----- .../samples/governance/DemoServiceIT.java | 52 ------ 4-governance/pom.xml | 1 - 17 files changed, 774 deletions(-) delete mode 100644 4-governance/dubbo-samples-meshrule-router/case-configuration.yml delete mode 100644 4-governance/dubbo-samples-meshrule-router/case-versions.conf delete mode 100644 4-governance/dubbo-samples-meshrule-router/pom.xml delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicConsumer.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider2.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/RuleUtil.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/api/DemoService.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl2.java delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/resources/dubbo-routers-mesh-rule.yml delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/resources/log4j2.xml delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-consumer.xml delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider.xml delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider2.xml delete mode 100644 4-governance/dubbo-samples-meshrule-router/src/test/java/org/apache/dubbo/samples/governance/DemoServiceIT.java diff --git a/4-governance/dubbo-samples-meshrule-router/case-configuration.yml b/4-governance/dubbo-samples-meshrule-router/case-configuration.yml deleted file mode 100644 index 1f6c337569..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/case-configuration.yml +++ /dev/null @@ -1,68 +0,0 @@ -# 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. - -services: - zookeeper: - image: zookeeper:latest - - dubbo-samples-mesh-router-1: - type: app - basedir: . - mainClass: org.apache.dubbo.samples.governance.BasicProvider - systemProps: - - zookeeper.address=zookeeper - - zookeeper.port=2181 - - dubbo.port=20880 - waitPortsBeforeRun: - - zookeeper:2181 - checkPorts: - - 20880 - checkLog: "dubbo service started" - depends_on: - - zookeeper - - dubbo-samples-mesh-router-2: - type: app - basedir: . - mainClass: org.apache.dubbo.samples.governance.BasicProvider2 - systemProps: - - zookeeper.address=zookeeper - - zookeeper.port=2181 - - dubbo.port=20881 - waitPortsBeforeRun: - - zookeeper:2181 - checkPorts: - - 20881 - checkLog: "dubbo service started" - depends_on: - - zookeeper - - dubbo-samples-mesh-router-test: - type: test - basedir: . - tests: - - "**/*IT.class" - systemProps: - - zookeeper.address=zookeeper - - zookeeper.port=2181 - waitPortsBeforeRun: - - zookeeper:2181 - - dubbo-samples-mesh-router-1:20880 - - dubbo-samples-mesh-router-2:20881 - depends_on: - - zookeeper - - dubbo-samples-mesh-router-1 - - dubbo-samples-mesh-router-2 diff --git a/4-governance/dubbo-samples-meshrule-router/case-versions.conf b/4-governance/dubbo-samples-meshrule-router/case-versions.conf deleted file mode 100644 index b03fb1ae45..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/case-versions.conf +++ /dev/null @@ -1,25 +0,0 @@ -# -# -# 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. -# - - -# Supported component versions of the test case - -# Spring app -dubbo.version=3.* -spring.version=4.*, 5.* -java.version= [>= 8] diff --git a/4-governance/dubbo-samples-meshrule-router/pom.xml b/4-governance/dubbo-samples-meshrule-router/pom.xml deleted file mode 100644 index 8219cdee1c..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - org.apache.dubbo - 1.0-SNAPSHOT - - 4.0.0 - - dubbo-samples-meshrule-router - Dubbo Samples Mesh Rule Router - Dubbo Samples Mesh Rule Router - - - 1.8 - 1.8 - UTF-8 - - 3.3.1 - 4.3.30.RELEASE - 2.20.0 - 4.13.1 - - 3.7.0 - - - - - - org.springframework - spring-framework-bom - ${spring.version} - pom - import - - - - org.apache.dubbo - dubbo-bom - ${dubbo.version} - pom - import - - - - junit - junit - ${junit.version} - - - - - - - org.apache.dubbo - dubbo - - - - org.apache.dubbo - dubbo-zookeeper-curator5-spring-boot-starter - - - - org.springframework - spring-context-support - ${spring.version} - - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j2.version} - - - - junit - junit - test - - - - org.springframework - spring-test - test - - - - - - - javax.annotation - - [1.11,) - - - - javax.annotation - javax.annotation-api - 1.3.2 - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - - - - - - apache.snapshots.https - Apache Development Snapshot Repository - https://repository.apache.org/content/repositories/snapshots - default - - false - - - true - daily - - - - diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicConsumer.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicConsumer.java deleted file mode 100644 index f36c2d1a30..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicConsumer.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.dubbo.samples.governance; - -import org.apache.dubbo.samples.governance.api.DemoService; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -public class BasicConsumer { - - public static void main(String[] args) { - ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-consumer.xml"); - context.start(); - DemoService demoService = context.getBean("demoService", DemoService.class); - for (int index = 0; index < 100; index++) { - String result = demoService.sayHello("java"); - System.out.println(result); - } - } -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider.java deleted file mode 100644 index 033bf625a4..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.dubbo.samples.governance; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import java.util.concurrent.CountDownLatch; - -public class BasicProvider { - - public static void main(String[] args) throws Exception { - ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-provider.xml"); - context.start(); - - System.out.println("dubbo service started"); - new CountDownLatch(1).await(); - } - -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider2.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider2.java deleted file mode 100644 index c6d5898045..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/BasicProvider2.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.dubbo.samples.governance; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -import java.util.concurrent.CountDownLatch; - -public class BasicProvider2 { - - public static void main(String[] args) throws Exception { - ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-provider2.xml"); - context.start(); - - System.out.println("dubbo service started"); - new CountDownLatch(1).await(); - } - -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/RuleUtil.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/RuleUtil.java deleted file mode 100644 index f30abe87ea..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/RuleUtil.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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. - */ -package org.apache.dubbo.samples.governance; - -import org.apache.dubbo.common.utils.StringUtils; - -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.CuratorFrameworkFactory; -import org.apache.curator.retry.ExponentialBackoffRetry; - -import java.io.IOException; -import java.io.InputStream; - -public class RuleUtil { - private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1"); - private static CuratorFramework client; - - public static void main(String[] args) throws Exception { - initClient(); - generateRule(); - System.in.read(); - deleteRule(); - } - - public static void initClient() { - client = CuratorFrameworkFactory.newClient(zookeeperHost + ":2181", 60 * 1000, 60 * 1000, - new ExponentialBackoffRetry(1000, 3)); - client.start(); - } - - public static void generateRule() { - try (InputStream yamlStream = RuleUtil.class.getResourceAsStream("/dubbo-routers-mesh-rule.yml")) { - String path = "/dubbo/config/dubbo/governance-mesh-rule-router-provider.MESHAPPRULE"; - if (client.checkExists().forPath(path) == null) { - client.create().creatingParentsIfNeeded().forPath(path); - } - setData(path, streamToString(yamlStream)); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public static void deleteRule() throws Exception { - String path = "/dubbo/config/dubbo/governance-mesh-rule-router-provider.MESHAPPRULE"; - if (client.checkExists().forPath(path) == null) { - client.create().creatingParentsIfNeeded().forPath(path); - } - setData(path, ""); - } - - private static String streamToString(InputStream stream) throws IOException { - byte[] bytes = new byte[stream.available()]; - stream.read(bytes); - return new String(bytes); - } - - private static void setData(String path, String data) throws Exception { - client.setData().forPath(path, data.getBytes()); - } - - private static String pathToKey(String path) { - if (StringUtils.isEmpty(path)) { - return path; - } - return path.replace("/dubbo/config/", "").replaceAll("/", "."); - } - -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/api/DemoService.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/api/DemoService.java deleted file mode 100644 index bde5f6eb6a..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/api/DemoService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.dubbo.samples.governance.api; - -public interface DemoService { - - String sayHello(String name); - -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl.java deleted file mode 100644 index 8825f2a764..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.dubbo.samples.governance.impl; - -import org.apache.dubbo.samples.governance.api.DemoService; - -public class DemoServiceImpl implements DemoService { - - @Override - public String sayHello(String name) { - return "Hello," + name + " I'm Other Unit"; - } -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl2.java b/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl2.java deleted file mode 100644 index e415108ba1..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/java/org/apache/dubbo/samples/governance/impl/DemoServiceImpl2.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * 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. - * - */ - -package org.apache.dubbo.samples.governance.impl; - -import org.apache.dubbo.samples.governance.api.DemoService; - -public class DemoServiceImpl2 implements DemoService { - - @Override - public String sayHello(String name) { - return "Hello," + name + " I'm Center"; - } -} diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/resources/dubbo-routers-mesh-rule.yml b/4-governance/dubbo-samples-meshrule-router/src/main/resources/dubbo-routers-mesh-rule.yml deleted file mode 100644 index 84eee652ca..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/resources/dubbo-routers-mesh-rule.yml +++ /dev/null @@ -1,51 +0,0 @@ -# -# -# 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. -# -# - - -apiVersion: service.dubbo.apache.org/v1alpha1 -kind: VirtualService -metadata: {name: demo-route} -spec: - dubbo: - - routedetail: - - match: - - sourceLabels: {trafficLabel: xxx} - name: other-condition - route: - - destination: {host: demo, subset: other} - - name: center-match - route: - - destination: {host: demo, subset: center} - services: - - {regex: org.apache.dubbo.samples.governance.api.DemoService.*} - hosts: [demo] - ---- - -apiVersion: service.dubbo.apache.org/v1alpha1 -kind: DestinationRule -metadata: { name: demo-route } -spec: - host: demo - subsets: - - name: all - - labels: { ut: CENTER } - name: center - - labels: { ut: other } - name: other \ No newline at end of file diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/resources/log4j2.xml b/4-governance/dubbo-samples-meshrule-router/src/main/resources/log4j2.xml deleted file mode 100644 index 69e1321d22..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/resources/log4j2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-consumer.xml b/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-consumer.xml deleted file mode 100644 index 20c9ac5c05..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-consumer.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider.xml b/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider.xml deleted file mode 100644 index d4ece1d7b4..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider2.xml b/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider2.xml deleted file mode 100644 index e72aa5815c..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/main/resources/spring/dubbo-demo-provider2.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/4-governance/dubbo-samples-meshrule-router/src/test/java/org/apache/dubbo/samples/governance/DemoServiceIT.java b/4-governance/dubbo-samples-meshrule-router/src/test/java/org/apache/dubbo/samples/governance/DemoServiceIT.java deleted file mode 100644 index 4a522d280d..0000000000 --- a/4-governance/dubbo-samples-meshrule-router/src/test/java/org/apache/dubbo/samples/governance/DemoServiceIT.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -package org.apache.dubbo.samples.governance; - -import org.apache.dubbo.samples.governance.api.DemoService; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = {"classpath:/spring/dubbo-demo-consumer.xml"}) -public class DemoServiceIT { - @Autowired - @Qualifier("demoService") - private DemoService demoService; - - @BeforeClass - public static void setUp() throws Exception { - RuleUtil.initClient(); - RuleUtil.generateRule(); - Thread.sleep(1000); - } - - @Test - public void testDemoService() throws Exception { - for (int i = 0; i < 100; i++) { - Assert.assertEquals("Hello,java I'm Center", demoService.sayHello("java")); - } - } - -} diff --git a/4-governance/pom.xml b/4-governance/pom.xml index 2868d99569..a151666a72 100644 --- a/4-governance/pom.xml +++ b/4-governance/pom.xml @@ -30,7 +30,6 @@ dubbo-samples-applevel-override dubbo-samples-configconditionrouter dubbo-samples-conditionrouterv31 - dubbo-samples-meshrule-router dubbo-samples-metrics-prometheus dubbo-samples-metrics-spring-boot dubbo-samples-sentinel