Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1409#discussion_r45973217
  
    --- Diff: 
flink-yarn-tests/src/main/java/org/apache/flink/yarn/UtilsTest.java ---
    @@ -97,6 +98,18 @@ public void tooMuchCutoff() {
                Assert.assertEquals(0, Utils.calculateHeapSize(4000, conf));
        }
     
    +   @Test
    +   public void testGetEnvironmentVariables() {
    +           Configuration testConf = new Configuration();
    +           
testConf.setString("yarn.application-master.env.LD_LIBRARY_PATH", 
"/usr/lib/native");
    +
    +           Map<String, String> res = 
Utils.getEnvironmentVariables("yarn.application-master.env.", testConf);
    +
    +           Assert.assertEquals(1, res.size());
    +           Map.Entry<String, String> entry = 
res.entrySet().iterator().next();
    +           Assert.assertEquals("LD_LIBRARY_PATH", entry.getKey());
    +           Assert.assertEquals("/usr/lib/native", entry.getValue());
    +   }
    --- End diff --
    
    I think its okay to assume that the method will work for all prefix strings.
    This test is only about the method for extracting the variables.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to