Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GauthamBanasandra committed Dec 4, 2022
1 parent e467176 commit 92741d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ public void sanitizeEnv(Map<String, String> environment, Path pwd,
*
* @param environment The environment variables map to add the configuration values to.
*/
private void addConfigsToEnv(Map<String, String> environment) {
public void addConfigsToEnv(Map<String, String> environment) {
// variables here will be forced in, even if the container has
// specified them. Note: we do not track these in nmVars, to
// allow them to be ordered properly if they reference variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ public void handle(Event event) {
resources.put(userjar, lpaths);
Path nmp = new Path(testDir);

launch.addConfigsToEnv(userSetEnv);
launch.sanitizeEnv(userSetEnv, pwd, appDirs, userLocalDirs, containerLogs,
resources, nmp, nmEnvTrack);
Assert.assertTrue(userSetEnv.containsKey("MALLOC_ARENA_MAX"));
Expand Down Expand Up @@ -864,6 +865,7 @@ public void handle(Event event) {

ContainerLaunch launch = new ContainerLaunch(distContext, conf,
dispatcher, exec, null, container, dirsHandler, containerManager);
launch.addConfigsToEnv(userSetEnv);
launch.sanitizeEnv(userSetEnv, pwd, appDirs, userLocalDirs, containerLogs,
resources, nmp, nmEnvTrack);

Expand All @@ -876,6 +878,7 @@ public void handle(Event event) {
containerLaunchContext.setEnvironment(userSetEnv);
when(container.getLaunchContext()).thenReturn(containerLaunchContext);

launch.addConfigsToEnv(userSetEnv);
launch.sanitizeEnv(userSetEnv, pwd, appDirs, userLocalDirs, containerLogs,
resources, nmp, nmEnvTrack);

Expand Down

0 comments on commit 92741d0

Please sign in to comment.