/** * Test setTimes operation. * * @throws Exception If failed. */ @Test public void testSetTimes() throws Exception { createFile(igfs, FILE, true, chunk); checkExist(igfs, igfsSecondary, DIR); checkExist(igfs, igfsSecondary, SUBDIR); checkExist(igfs, igfsSecondary, FILE); checkSetTimes(SUBDIR); checkSetTimes(FILE); try { igfs.setTimes(FILE2, Long.MAX_VALUE, Long.MAX_VALUE); fail("Exception is not thrown for missing file."); } catch (Exception ignore) { // No-op. } }
try (IgfsOutputStream os = igfs.create(new IgfsPath("/k/l"), false)) {} fail("Exception expected"); } catch (IgniteException ignored) { try (IgfsOutputStream os = igfs.create(new IgfsPath("/k/l/m"), true)) {} fail("Exception expected"); } catch (IgniteException ignored) { try (IgfsOutputStream os = igfs.create(new IgfsPath("/k/l/m/n/o/p"), true)) {} fail("Exception expected"); } catch (IgniteException ignored) { try (IgfsOutputStream os = igfs.create(new IgfsPath("/x/y"), true)) {} fail("Exception expected"); } catch (IgniteException ignored) {
fail("Exception expected"); } catch (IgniteException ignored) { fail("Exception expected"); } catch (IgniteException ignored) { fail("Exception expected"); } catch (IgniteException ignored) { fail("Exception expected"); } catch (IgniteException ignored) { fail("Exception expected"); } catch (IgniteException ignored) {