Exemplo n.º 1
0
 @Test
 public void touchTest() throws IOException {
   String[] argv = new String[] {"touch", "/testFile"};
   mFsShell.touch(argv);
   TachyonFile tFile = mTfs.getFile(new TachyonURI("/testFile"));
   Assert.assertNotNull(tFile);
   Assert.assertEquals(getCommandOutput(argv), mOutput.toString());
   Assert.assertTrue(tFile.isFile());
 }
Exemplo n.º 2
0
 @Test
 public void touchTestWithFullURI() throws IOException {
   String tachyonURI =
       "tachyon://"
           + mLocalTachyonCluster.getMasterHostname()
           + ":"
           + mLocalTachyonCluster.getMasterPort()
           + "/destFileURI";
   // when
   String[] argv = new String[] {"touch", tachyonURI};
   mFsShell.touch(argv);
   // then
   TachyonFile tFile = mTfs.getFile(new TachyonURI("/destFileURI"));
   Assert.assertThat(tFile, CoreMatchers.notNullValue());
   Assert.assertThat(getCommandOutput(argv), CoreMatchers.equalTo(mOutput.toString()));
   Assert.assertThat(tFile.isFile(), CoreMatchers.equalTo(true));
 }