@Test public void testIncorrectSerializer4() { try { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(PARLLELISM); env.getConfig().disableSysoutLogging(); env .generateSequence(1, 10 * PARLLELISM) .map(new MapFunction<Long, ConsumesTooLittleSpanning>() { @Override public ConsumesTooLittleSpanning map(Long value) throws Exception { return new ConsumesTooLittleSpanning(); } }) .rebalance() .output(new DiscardingOutputFormat<ConsumesTooLittleSpanning>()); env.execute(); } catch (ProgramInvocationException e) { Throwable rootCause = e.getCause().getCause(); assertTrue(rootCause instanceof IOException); assertTrue(rootCause.getMessage().contains("broken serialization")); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testIncorrectSerializer3() { try { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(PARLLELISM); env.getConfig().disableSysoutLogging(); env .generateSequence(1, 10 * PARLLELISM) .map(new MapFunction<Long, ConsumesTooLittle>() { @Override public ConsumesTooLittle map(Long value) throws Exception { return new ConsumesTooLittle(); } }) .rebalance() .output(new DiscardingOutputFormat<ConsumesTooLittle>()); env.execute(); } catch (JobExecutionException e) { Throwable rootCause = e.getCause(); assertTrue(rootCause instanceof IOException); assertTrue(rootCause.getMessage().contains("broken serialization")); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testIncorrectSerializer1() { try { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(PARLLELISM); env.getConfig().disableSysoutLogging(); env .generateSequence(1, 10 * PARLLELISM) .map(new MapFunction<Long, ConsumesTooMuch>() { @Override public ConsumesTooMuch map(Long value) throws Exception { return new ConsumesTooMuch(); } }) .rebalance() .output(new DiscardingOutputFormat<ConsumesTooMuch>()); env.execute(); } catch (JobExecutionException e) { Throwable rootCause = e.getCause(); assertTrue(rootCause instanceof IOException); assertTrue(rootCause.getMessage().contains("broken serialization")); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testIncorrectSerializer2() { try { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(PARLLELISM); env.getConfig().disableSysoutLogging(); env .generateSequence(1, 10 * PARLLELISM) .map(new MapFunction<Long, ConsumesTooMuchSpanning>() { @Override public ConsumesTooMuchSpanning map(Long value) throws Exception { return new ConsumesTooMuchSpanning(); } }) .rebalance() .output(new DiscardingOutputFormat<ConsumesTooMuchSpanning>()); env.execute(); } catch (JobExecutionException e) { Throwable rootCause = e.getCause(); assertTrue(rootCause instanceof IOException); assertTrue(rootCause.getMessage().contains("broken serialization")); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }