You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by xt...@apache.org on 2020/10/19 02:41:09 UTC
[flink] branch master updated: [FLINK-19689][yarn][test] Fix
TaskExecutorProcessSpecContainerResourcePriorityAdapterTest failure for
Hadoop 2.10+.
This is an automated email from the ASF dual-hosted git repository.
xtsong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new f734f59 [FLINK-19689][yarn][test] Fix TaskExecutorProcessSpecContainerResourcePriorityAdapterTest failure for Hadoop 2.10+.
f734f59 is described below
commit f734f59488afaa7ad984362a0dd62e99c134f062
Author: Xintong Song <to...@gmail.com>
AuthorDate: Sun Oct 18 11:17:36 2020 +0800
[FLINK-19689][yarn][test] Fix TaskExecutorProcessSpecContainerResourcePriorityAdapterTest failure for Hadoop 2.10+.
This closes #13673.
---
.../yarn/ResourceInformationReflectorTest.java | 3 ++-
flink-yarn/src/test/resources/resource-types.xml | 28 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/flink-yarn/src/test/java/org/apache/flink/yarn/ResourceInformationReflectorTest.java b/flink-yarn/src/test/java/org/apache/flink/yarn/ResourceInformationReflectorTest.java
index 8ff48f7..8f1453c 100644
--- a/flink-yarn/src/test/java/org/apache/flink/yarn/ResourceInformationReflectorTest.java
+++ b/flink-yarn/src/test/java/org/apache/flink/yarn/ResourceInformationReflectorTest.java
@@ -29,6 +29,7 @@ import java.util.Map;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@@ -93,7 +94,7 @@ public class ResourceInformationReflectorTest extends TestLogger {
// make sure that Resource has at least two associated resources (cpu and memory)
final Map<String, Long> resourcesResult = ResourceInformationReflector.INSTANCE.getAllResourceInfos(resource);
- assertThat(resourcesResult.size(), is(2));
+ assertThat(resourcesResult.size(), greaterThanOrEqualTo(2));
}
@Test
diff --git a/flink-yarn/src/test/resources/resource-types.xml b/flink-yarn/src/test/resources/resource-types.xml
new file mode 100644
index 0000000..05e2fa9
--- /dev/null
+++ b/flink-yarn/src/test/resources/resource-types.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+/**
+ * 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.
+ */
+-->
+
+<configuration>
+ <property>
+ <name>yarn.resource-types</name>
+ <value>testing-external-resource</value>
+ </property>
+</configuration>