MAPREDUCE-7105. Fix TestNativeCollectorOnlyHandler.testOnCall on Windows because of the path format. Contributed by Giovanni Matteo Fumarola.
This commit is contained in:
parent
e2c172dc9f
commit
dad1bb868f
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.hadoop.mapred.nativetask.handlers;
|
package org.apache.hadoop.mapred.nativetask.handlers;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
@ -33,6 +34,7 @@
|
|||||||
import org.apache.hadoop.mapred.nativetask.testutil.TestConstants;
|
import org.apache.hadoop.mapred.nativetask.testutil.TestConstants;
|
||||||
import org.apache.hadoop.mapred.nativetask.util.OutputUtil;
|
import org.apache.hadoop.mapred.nativetask.util.OutputUtil;
|
||||||
import org.apache.hadoop.mapred.nativetask.util.ReadWriteBuffer;
|
import org.apache.hadoop.mapred.nativetask.util.ReadWriteBuffer;
|
||||||
|
import org.apache.hadoop.util.StringUtils;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@ -110,9 +112,12 @@ public void testOnCall() throws IOException {
|
|||||||
}
|
}
|
||||||
Assert.assertTrue("exception thrown", thrown);
|
Assert.assertTrue("exception thrown", thrown);
|
||||||
|
|
||||||
final String expectedOutputPath = LOCAL_DIR + "/output/file.out";
|
final String expectedOutputPath = StringUtils.join(File.separator,
|
||||||
final String expectedOutputIndexPath = LOCAL_DIR + "/output/file.out.index";
|
new String[] {LOCAL_DIR, "output", "file.out"});
|
||||||
final String expectedSpillPath = LOCAL_DIR + "/output/spill0.out";
|
final String expectedOutputIndexPath = StringUtils.join(File.separator,
|
||||||
|
new String[] {LOCAL_DIR, "output", "file.out.index"});
|
||||||
|
final String expectedSpillPath = StringUtils.join(File.separator,
|
||||||
|
new String[] {LOCAL_DIR, "output", "spill0.out"});
|
||||||
|
|
||||||
final String outputPath = handler.onCall(
|
final String outputPath = handler.onCall(
|
||||||
NativeCollectorOnlyHandler.GET_OUTPUT_PATH, null).readString();
|
NativeCollectorOnlyHandler.GET_OUTPUT_PATH, null).readString();
|
||||||
|
Loading…
Reference in New Issue
Block a user