You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2017/07/01 07:36:02 UTC

[11/14] flink git commit: [FLINK-6867] [elasticsearch] Fix instable Elasticsearch 1.x ITCases

[FLINK-6867] [elasticsearch] Fix instable Elasticsearch 1.x ITCases

The root cause for the instability in ES 1.x is that we're testing both
embedded client mode and transport client mode against the same
Elasticsearch environment. This commit removes the embedded mode
testing, as that method is generally discouraged anyways.

This closes #4191.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/2d275e0c
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/2d275e0c
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/2d275e0c

Branch: refs/heads/master
Commit: 2d275e0c26b6e9b13df89450e7ff6291cae5bede
Parents: ba75bde
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
Authored: Tue Jun 27 16:40:51 2017 +0800
Committer: Tzu-Li (Gordon) Tai <tz...@apache.org>
Committed: Sat Jul 1 15:33:42 2017 +0800

----------------------------------------------------------------------
 .../elasticsearch/ElasticsearchSinkITCase.java  | 31 --------------------
 1 file changed, 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/2d275e0c/flink-connectors/flink-connector-elasticsearch/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchSinkITCase.java
----------------------------------------------------------------------
diff --git a/flink-connectors/flink-connector-elasticsearch/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchSinkITCase.java b/flink-connectors/flink-connector-elasticsearch/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchSinkITCase.java
index 1fcfa2e..3772f02 100644
--- a/flink-connectors/flink-connector-elasticsearch/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchSinkITCase.java
+++ b/flink-connectors/flink-connector-elasticsearch/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchSinkITCase.java
@@ -66,37 +66,6 @@ public class ElasticsearchSinkITCase extends ElasticsearchSinkTestBase {
 	// -- Tests specific to Elasticsearch 1.x --
 
 	/**
-	 * Tests that the Elasticsearch sink works properly using an embedded node to connect to Elasticsearch.
-	 */
-	@Test
-	public void testEmbeddedNode() throws Exception {
-		final String index = "embedded-node-test-index";
-
-		final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
-
-		DataStreamSource<Tuple2<Integer, String>> source = env.addSource(new SourceSinkDataTestKit.TestDataSourceFunction());
-
-		Map<String, String> userConfig = new HashMap<>();
-		// This instructs the sink to emit after every element, otherwise they would be buffered
-		userConfig.put(ElasticsearchSinkBase.CONFIG_KEY_BULK_FLUSH_MAX_ACTIONS, "1");
-		userConfig.put("cluster.name", CLUSTER_NAME);
-		userConfig.put("node.local", "true");
-
-		source.addSink(new ElasticsearchSink<>(
-			userConfig,
-			new SourceSinkDataTestKit.TestElasticsearchSinkFunction(index))
-		);
-
-		env.execute("Elasticsearch Embedded Node Test");
-
-		// verify the results
-		Client client = embeddedNodeEnv.getClient();
-		SourceSinkDataTestKit.verifyProducedSinkData(client, index);
-
-		client.close();
-	}
-
-	/**
 	 * Tests that behaviour of the deprecated {@link IndexRequestBuilder} constructor works properly.
 	 */
 	@Test