/** * Test task. * * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") @Test public void testTaskAsync() throws Exception { String arg = DICTIONARY[new Random(System.currentTimeMillis()).nextInt(DICTIONARY.length)]; generateFile(TOTAL_WORDS); Long genLen = igfs.info(FILE).length(); IgniteBiTuple<Long, Integer> taskRes = igfs.executeAsync(new Task(), new IgfsStringDelimiterRecordResolver(" "), Collections.singleton(FILE), arg).get(); assert F.eq(genLen, taskRes.getKey()); assert F.eq(TOTAL_WORDS, taskRes.getValue()); }