Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-12947

Authorization tests are flaky

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: Security
    • Labels:
      None
    • Rank:
      1|i009w7:

      Description

      Noticing a lot of authorization tests to fail in feature branches. Re-running typically fixes it. Here is the most recent failure: https://builds.cask.co/browse/CDAP-RUT1457-4#new-failed-tests

      
      Tests
      New test failures 7
      Status	Test	View job	Duration	
      Failed	AuthorizationTest testWorkerStreamAuth History
      Unit Test Job	< 1 sec	
      java.lang.AssertionError: expected:<[]> but was:<[Privilege{authorizable=namespace:authorization, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=READ}, Privilege{authorizable=stream:authorization.dataStream, action=ADMIN}, Privilege{authorizable=dataset_type:outputNS.keyValueTable, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=ADMIN}, Privilege{authorizable=application:authorization.WriterApp, action=ADMIN}, Privilege{authorizable=artifact:authorization.CrossNsDatasetAccessApp, action=ADMIN}, Privilege{authorizable=namespace:outputNS, action=ADMIN}]>
      	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:144)
      	at co.cask.cdap.security.AuthorizationTest.setupTest(AuthorizationTest.java:198)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (48 more lines...)
      Failed	AuthorizationTest testCrossNSSpark History
      Unit Test Job	< 1 sec	
      java.lang.AssertionError: expected:<[]> but was:<[Privilege{authorizable=namespace:authorization, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=READ}, Privilege{authorizable=stream:authorization.dataStream, action=ADMIN}, Privilege{authorizable=dataset_type:outputNS.keyValueTable, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=ADMIN}, Privilege{authorizable=application:authorization.WriterApp, action=ADMIN}, Privilege{authorizable=artifact:authorization.CrossNsDatasetAccessApp, action=ADMIN}, Privilege{authorizable=namespace:outputNS, action=ADMIN}]>
      	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:144)
      	at co.cask.cdap.security.AuthorizationTest.setupTest(AuthorizationTest.java:198)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (48 more lines...)
      Failed	AuthorizationTest testSparkStreamAuth History
      Unit Test Job	< 1 sec	
      java.lang.AssertionError: expected:<[]> but was:<[Privilege{authorizable=namespace:authorization, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=READ}, Privilege{authorizable=stream:authorization.dataStream, action=ADMIN}, Privilege{authorizable=dataset_type:outputNS.keyValueTable, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=ADMIN}, Privilege{authorizable=application:authorization.WriterApp, action=ADMIN}, Privilege{authorizable=artifact:authorization.CrossNsDatasetAccessApp, action=ADMIN}, Privilege{authorizable=namespace:outputNS, action=ADMIN}]>
      	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:144)
      	at co.cask.cdap.security.AuthorizationTest.setupTest(AuthorizationTest.java:198)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (48 more lines...)
      Failed	AuthorizationTest testCrossNSFlowlet History
      Unit Test Job	1 sec	
      java.lang.RuntimeException: co.cask.cdap.common.BadRequestException: Program 'program:authorization.WriterApp.-SNAPSHOT.flow.dataFlow' is not running.
      	at com.google.common.base.Throwables.propagate(Throwables.java:160)
      	at co.cask.cdap.test.internal.DefaultApplicationManager.stopProgram(DefaultApplicationManager.java:153)
      	at co.cask.cdap.test.AbstractProgramManager.stop(AbstractProgramManager.java:65)
      	at co.cask.cdap.security.AuthorizationTest.testCrossNSDatasetAccessFromFlowlet(AuthorizationTest.java:888)
      	at co.cask.cdap.security.AuthorizationTest.testCrossNSFlowlet(AuthorizationTest.java:820)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (58 more lines...)
      Failed	AuthorizationTest testAddDropPartitions History
      Unit Test Job	< 1 sec	
      java.lang.AssertionError: expected:<[]> but was:<[Privilege{authorizable=namespace:authorization, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=READ}, Privilege{authorizable=stream:authorization.dataStream, action=ADMIN}, Privilege{authorizable=dataset_type:outputNS.keyValueTable, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=ADMIN}, Privilege{authorizable=application:authorization.WriterApp, action=ADMIN}, Privilege{authorizable=artifact:authorization.CrossNsDatasetAccessApp, action=ADMIN}, Privilege{authorizable=namespace:outputNS, action=ADMIN}]>
      	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:144)
      	at co.cask.cdap.security.AuthorizationTest.setupTest(AuthorizationTest.java:198)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (48 more lines...)
      Failed	AuthorizationTest testStreams History
      Unit Test Job	< 1 sec	
      java.lang.AssertionError: expected:<[]> but was:<[Privilege{authorizable=namespace:authorization, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=READ}, Privilege{authorizable=stream:authorization.dataStream, action=ADMIN}, Privilege{authorizable=dataset_type:outputNS.keyValueTable, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=ADMIN}, Privilege{authorizable=application:authorization.WriterApp, action=ADMIN}, Privilege{authorizable=artifact:authorization.CrossNsDatasetAccessApp, action=ADMIN}, Privilege{authorizable=namespace:outputNS, action=ADMIN}]>
      	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:144)
      	at co.cask.cdap.security.AuthorizationTest.setupTest(AuthorizationTest.java:198)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (48 more lines...)
      Failed	AuthorizationTest testMRStreamAuth History
      Unit Test Job	< 1 sec	
      java.lang.AssertionError: expected:<[]> but was:<[Privilege{authorizable=namespace:authorization, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=READ}, Privilege{authorizable=stream:authorization.dataStream, action=ADMIN}, Privilege{authorizable=dataset_type:outputNS.keyValueTable, action=ADMIN}, Privilege{authorizable=dataset:outputNS.store, action=ADMIN}, Privilege{authorizable=application:authorization.WriterApp, action=ADMIN}, Privilege{authorizable=artifact:authorization.CrossNsDatasetAccessApp, action=ADMIN}, Privilege{authorizable=namespace:outputNS, action=ADMIN}]>
      	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:144)
      	at co.cask.cdap.security.AuthorizationTest.setupTest(AuthorizationTest.java:198)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      (48 more lines...)
      
      

        Attachments

          Activity

            People

            • Assignee:
              yaojie Yaojie Feng
              Reporter:
              sree Sreevatsan Raman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: