@Test public void testStrict() throws IOException { Fields fields = new Fields( "first", "second", "third", "fourth", "fifth" ); Tap input = getPlatform().getDelimitedFile( fields, false, false, ",", "\"", null, testDelimitedExtraField, SinkMode.KEEP ); Tap output = getPlatform().getDelimitedFile( fields, false, false, ",", "\"", null, getOutputPath( "strict" + ComparePlatformsTest.NONDETERMINISTIC ), SinkMode.REPLACE ); Pipe pipe = new Pipe( "pipe" ); Flow flow = getPlatform().getFlowConnector().connect( input, output, pipe ); try { flow.complete(); fail( "should fail on too many fields" ); } catch( Exception exception ) { // ignore } }
@Test public void testStrict() throws IOException { Fields fields = new Fields( "first", "second", "third", "fourth", "fifth" ); Tap input = getPlatform().getDelimitedFile( fields, false, false, ",", "\"", null, testDelimitedExtraField, SinkMode.KEEP ); Tap output = getPlatform().getDelimitedFile( fields, false, false, ",", "\"", null, getOutputPath( "strict" + ComparePlatformsTest.NONDETERMINISTIC ), SinkMode.REPLACE ); Pipe pipe = new Pipe( "pipe" ); Flow flow = getPlatform().getFlowConnector().connect( input, output, pipe ); try { flow.complete(); fail( "should fail on too many fields" ); } catch( Exception exception ) { // ignore } }