Skip to content

Commit

Permalink
[FLINK-9762] Test setTmpDirectoriesConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Nitavskyi committed Jul 12, 2018
1 parent 72cf6ef commit 8048552
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,23 @@ public void testGetTaskManagerShellCommand() {
true, true, true, this.getClass()));

}

@Test
public void testSetTmpDirectoriesConfig(){
Configuration config = new Configuration();

// test that default value is taken
BootstrapTools.setTmpDirectoriesConfig(config, "default/directory/path");
assertEquals(config.getString(CoreOptions.TMP_DIRS), "default/directory/path");

// test that we ignore default value is value is set before
BootstrapTools.setTmpDirectoriesConfig(config, "not/default/directory/path");
assertEquals(config.getString(CoreOptions.TMP_DIRS), "default/directory/path");

//test that we consider empty value as no value set
config.setString(CoreOptions.TMP_DIRS, "");
BootstrapTools.setTmpDirectoriesConfig(config, "some/new/path");
assertEquals(config.getString(CoreOptions.TMP_DIRS), "some/new/path");
}

}

0 comments on commit 8048552

Please sign in to comment.