Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-15226 Über-JIRA: S3Guard Phase III: Hadoop 3.2 features
  3. HADOOP-15754

s3guard: testDynamoTableTagging should clear existing config

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0
    • fs/s3
    • None

    Description

      I recently committed HADOOP-14734 which adds support for tagging Dynamo DB tables for S3Guard when they are created.

       

      Later, when testing another patch, I hit a test failure because I still had a tag option set in my test configuration (auth-keys.xml) that was adding my own table tag.

      [ERROR] testDynamoTableTagging(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)  Time elapsed: 13.384 s  <<< FAILURE!
      
      java.lang.AssertionError: expected:<2> but was:<3>
      
              at org.junit.Assert.fail(Assert.java:88)
      
              at org.junit.Assert.failNotEquals(Assert.java:743)
      
              at org.junit.Assert.assertEquals(Assert.java:118)
      
              at org.junit.Assert.assertEquals(Assert.java:555)
      
              at org.junit.Assert.assertEquals(Assert.java:542)
      
              at org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB.testDynamoTableTagging(ITestS3GuardToolDynamoDB.java:129)
      
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
              at java.lang.reflect.Method.invoke(Method.java:498)
      
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      
              at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      
              at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      
              at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

      I think the solution is just to clear any tag.* options set in the configuration at the beginning of the test.

      Attachments

        1. HADOOP-15754.001.patch
          3 kB
          Gabor Bota
        2. HADOOP-15754.002.patch
          5 kB
          Gabor Bota

        Activity

          People

            gabor.bota Gabor Bota
            fabbri Aaron Fabbri
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: