Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18633

fix test AbstractContractDistCpTest#testDistCpUpdateCheckFileSkip

    XMLWordPrintableJSON

Details

    Description

      In the newly introduced test testDistCpUpdateCheckFileSkip, for the first pass of "distcp -update", target file should not be present so that the copy takes place and creates the target file. 

      Currently, we create both the source and target file with same block size from the start which can lead to flakiness due to race condition causing the modification time of the target file to be greater than/equal to the source and not copy the file at all. This can be seen more in the TestLocalContractDistCp due to no remote calls to create the target.

      java.lang.AssertionError: Mismatch in COPY counter value expected:<1> but was:<0>
      	at org.junit.Assert.fail(Assert.java:89)
      	at org.junit.Assert.failNotEquals(Assert.java:835)
      	at org.junit.Assert.assertEquals(Assert.java:647)
      	at org.apache.hadoop.tools.contract.AbstractContractDistCpTest.verifySkipAndCopyCounter(AbstractContractDistCpTest.java:1000)
      	at org.apache.hadoop.tools.contract.AbstractContractDistCpTest.testDistCpUpdateCheckFileSkip(AbstractContractDistCpTest.java:919) 

      Attachments

        Issue Links

          Activity

            People

              mehakmeetSingh Mehakmeet Singh
              mehakmeetSingh Mehakmeet Singh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: