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

CDAP Test base doesn't work in windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.1
    • Component/s: CDAP, Test
    • Labels:
      None
    • Release Notes:
      Fixed an issue with namespace deletion which caused CDAP Application test cases to fail in a Windows environment.
    • Rank:
      1|hzzfaf:

      Description

      Running a CDAP testbase test in windows fails during deleting namespace default in TestBase#finish method.

      This issue is similar to https://issues.cask.co/browse/CDAP-4695

      we might have to do a similar fix for test base and test it in windows.

      this is the stack trace from running the example
      co.cask.cdap.examples.clicksandviews.ClicksAndViewsMapReduceTest#testClicksAndViews

      2016-07-05 14:54:53,989 - WARN  [main:c.c.c.i.a.n.DefaultNamespaceAdmin@250] - Error while deleting namespace namespace:default
      java.lang.RuntimeException: java.nio.file.AccessDeniedException: C:\CDAP\cdap-sdk-3.4.2\examples\ClicksAndViews\target\junit6568766843094827665\junit899986275521428455\na
      1428455\namespaces\default\streams\.deleted\clicks1467710693982
              at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-13.0.1.jar:na]
              at co.cask.cdap.data2.transaction.stream.FileStreamAdmin$7.run(FileStreamAdmin.java:535) ~[cdap-data-fabric-3.4.2.jar:na]
              at co.cask.cdap.data.stream.AbstractStreamCoordinatorClient.deleteStream(AbstractStreamCoordinatorClient.java:121) ~[cdap-data-fabric-3.4.2.jar:na]
              at co.cask.cdap.data2.transaction.stream.FileStreamAdmin.doDrop(FileStreamAdmin.java:501) ~[cdap-data-fabric-3.4.2.jar:na]
              at co.cask.cdap.data2.transaction.stream.FileStreamAdmin.dropAllInNamespace(FileStreamAdmin.java:155) ~[cdap-data-fabric-3.4.2.jar:na]
              at co.cask.cdap.internal.app.namespace.DefaultNamespaceAdmin.delete(DefaultNamespaceAdmin.java:231) ~[cdap-app-fabric-3.4.2.jar:na]
              at co.cask.cdap.test.TestBase.finish(TestBase.java:396) [cdap-unit-test-3.4.2.jar:na]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65]
              at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65]
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33) [junit-4.11.jar:na]
              at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) [junit-4.11.jar:na]
              at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.11.jar:na]
              at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) [surefire-junit4-2.14.1.jar:2.14.1]
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) [surefire-junit4-2.14.1.jar:2.14.1]
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) [surefire-junit4-2.14.1.jar:2.14.1]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65]
              at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65]
              at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) [surefire-api-2.14.1.jar:2.14.1]
              at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) [surefire-booter-2.14.1.jar:2.14.1]
              at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) [surefire-booter-2.14.1.jar:2.14.1]
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) [surefire-booter-2.14.1.jar:2.14.1]
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95) [surefire-booter-2.14.1.jar:2.14.1]
      Caused by: java.nio.file.AccessDeniedException: C:\CDAP\cdap-sdk-3.4.2\examples\ClicksAndViews\target\junit6568766843094827665\junit899986275521428455\namespaces\default\
      s\default\streams\.deleted\clicks1467710693982
              at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) ~[na:1.8.0_65]
              at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[na:1.8.0_65]
              at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:301) ~[na:1.8.0_65]
              at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287) ~[na:1.8.0_65]
              at java.nio.file.Files.move(Files.java:1395) ~[na:1.8.0_65]
              at org.apache.twill.filesystem.LocalLocation.renameTo(LocalLocation.java:178) ~[twill-common-0.7.0-incubating.jar:0.7.0-incubating]
              at co.cask.cdap.data2.transaction.stream.FileStreamAdmin$7.run(FileStreamAdmin.java:530) ~[cdap-data-fabric-3.4.2.jar:na]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shankar Shankar Selvam
                Reporter:
                shankar Shankar Selvam
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: