@@ -0,0 +1,2451 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied.  See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage org.apache.flink.graph.vertex.centric;%0A%0Aimport org.apache.flink.api.common.functions.RichMapFunction;%0Aimport org.apache.flink.api.java.ExecutionEnvironment;%0Aimport org.apache.flink.api.java.tuple.Tuple2;%0Aimport org.apache.flink.graph.Graph;%0Aimport org.apache.flink.graph.Vertex;%0Aimport org.apache.flink.graph.partition.centric.PCConnectedComponents;%0Aimport org.apache.flink.graph.partition.centric.utils.GraphGenerator;%0Aimport org.apache.flink.test.testdata.ConnectedComponentsData;%0Aimport org.junit.Test;%0A%0Aimport java.util.List;%0A%0A/**%0A * Test for our modification of ConnectedComponent algorithm implemented with%0A * vertex centric iteration%0A */%0Apublic class ConnectedComponentTest %7B%0A%0A    @Test%0A    public void testRun() throws Exception %7B%0A        int verticesCount = 5000;%0A        int edgesCount = verticesCount * 2;%0A%0A        ExecutionEnvironment environment = ExecutionEnvironment.getExecutionEnvironment();%0A        environment.getConfig().disableSysoutLogging();%0A%0A        Graph%3CLong, Long, Long%3E graph = GraphGenerator.generateGraph(verticesCount, edgesCount, environment);%0A%0A        ConnectedComponents%3CLong, Long%3E algo = new ConnectedComponents%3C%3E(verticesCount);%0A%0A        List%3CTuple2%3CLong, Long%3E%3E result = algo.run(graph).map(%0A                new RichMapFunction%3CVertex%3CLong, Long%3E, Tuple2%3CLong, Long%3E%3E() %7B%0A                    @Override%0A                    public Tuple2%3CLong, Long%3E map(Vertex%3CLong, Long%3E value) throws Exception %7B%0A                        return new Tuple2%3C%3E(value.getId(), value.getValue());%0A                    %7D%0A                %7D).collect();%0A%0A        ConnectedComponentsData.checkOddEvenResult(result);%0A    %7D%0A%7D%0A

Add test for ConnectedComponent