Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1821

Temporary data is not cleared after TestCatalog

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: Unit Test
    • Labels:
      None

      Description

      TestCatalog creates a random directory and writes some data for testing. However, that directory is not removed properly after test.

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user jihoonson opened a pull request:

        https://github.com/apache/tajo/pull/737

        TAJO-1821: Temporary data is not cleared after TestCatalog

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/jihoonson/tajo-2 TAJO-1821

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/737.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #737


        commit 9b32ae5e50a8b205390e13fe6863889fdadba18f
        Author: Jihoon Son <jihoonson@apache.org>
        Date: 2015-09-07T06:59:59Z

        TAJO-1821


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user jihoonson opened a pull request: https://github.com/apache/tajo/pull/737 TAJO-1821 : Temporary data is not cleared after TestCatalog You can merge this pull request into a Git repository by running: $ git pull https://github.com/jihoonson/tajo-2 TAJO-1821 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/737.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #737 commit 9b32ae5e50a8b205390e13fe6863889fdadba18f Author: Jihoon Son <jihoonson@apache.org> Date: 2015-09-07T06:59:59Z TAJO-1821
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on a diff in the pull request:

        https://github.com/apache/tajo/pull/737#discussion_r38851050

        — Diff: tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java —
        @@ -64,18 +62,10 @@

        static CatalogServer server;
        static CatalogService catalog;
        + static String testDir;

        • public static TajoConf newTajoConfForCatalogTest() throws IOException, UnsupportedCatalogStore { - return CatalogTestingUtil.configureCatalog(new TajoConf(), setupClusterTestBuildDir().getAbsolutePath()); - }

          -

        • public static File setupClusterTestBuildDir() throws IOException {
        • String randomStr = UUID.randomUUID().toString();
        • String dirStr = CommonTestingUtil.getTestDir(randomStr).toString();
        • File dir = new File(dirStr).getAbsoluteFile();
        • // Have it cleaned up on exit
        • dir.deleteOnExit();
        • return dir;
          + public static TajoConf newTajoConfForCatalogTest(String testDir) throws IOException, UnsupportedCatalogStore {
            • End diff –

        It would be better if it returns a pair of TajoConf and auto-generated directory instead of taking ``testDir``, especially if it is used to make a temporary directory rather than a designated directory.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/737#discussion_r38851050 — Diff: tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java — @@ -64,18 +62,10 @@ static CatalogServer server; static CatalogService catalog; + static String testDir; public static TajoConf newTajoConfForCatalogTest() throws IOException, UnsupportedCatalogStore { - return CatalogTestingUtil.configureCatalog(new TajoConf(), setupClusterTestBuildDir().getAbsolutePath()); - } - public static File setupClusterTestBuildDir() throws IOException { String randomStr = UUID.randomUUID().toString(); String dirStr = CommonTestingUtil.getTestDir(randomStr).toString(); File dir = new File(dirStr).getAbsoluteFile(); // Have it cleaned up on exit dir.deleteOnExit(); return dir; + public static TajoConf newTajoConfForCatalogTest(String testDir) throws IOException, UnsupportedCatalogStore { End diff – It would be better if it returns a pair of TajoConf and auto-generated directory instead of taking ``testDir``, especially if it is used to make a temporary directory rather than a designated directory.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/737#issuecomment-138265208

        The patch looks good to me.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/737#issuecomment-138265208 The patch looks good to me.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on the pull request:

        https://github.com/apache/tajo/pull/737#issuecomment-138273732

        Thanks. I've reflected your comment.

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/737#issuecomment-138273732 Thanks. I've reflected your comment.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/737#issuecomment-138280611

        +1 LGTM!

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/737#issuecomment-138280611 +1 LGTM!
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jinossy commented on the pull request:

        https://github.com/apache/tajo/pull/737#issuecomment-138281978

        I'm reviewing. Hold on please

        Show
        githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/737#issuecomment-138281978 I'm reviewing. Hold on please
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jinossy commented on the pull request:

        https://github.com/apache/tajo/pull/737#issuecomment-138288978

        +1 LGTM

        Show
        githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/737#issuecomment-138288978 +1 LGTM
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #487 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/487/)
        TAJO-1821: Temporary data is not cleared after TestCatalog. (jihoonson: rev 8a27a43ffe13c3b72d57b66f5fda82d6bb75357c)

        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        • CHANGES
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestLinkedMetadataManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #487 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/487/ ) TAJO-1821 : Temporary data is not cleared after TestCatalog. (jihoonson: rev 8a27a43ffe13c3b72d57b66f5fda82d6bb75357c) tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java CHANGES tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestLinkedMetadataManager.java
        Hide
        jihoonson Jihoon Son added a comment -

        Committed to master and 0.11.

        Show
        jihoonson Jihoon Son added a comment - Committed to master and 0.11.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/737

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/737
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on the pull request:

        https://github.com/apache/tajo/pull/737#issuecomment-138436308

        Thank you for your review!

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/737#issuecomment-138436308 Thank you for your review!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #845 (See https://builds.apache.org/job/Tajo-master-build/845/)
        TAJO-1821: Temporary data is not cleared after TestCatalog. (jihoonson: rev 8a27a43ffe13c3b72d57b66f5fda82d6bb75357c)

        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestLinkedMetadataManager.java
        • CHANGES
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #845 (See https://builds.apache.org/job/Tajo-master-build/845/ ) TAJO-1821 : Temporary data is not cleared after TestCatalog. (jihoonson: rev 8a27a43ffe13c3b72d57b66f5fda82d6bb75357c) tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestLinkedMetadataManager.java CHANGES tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.11.0-build #22 (See https://builds.apache.org/job/Tajo-0.11.0-build/22/)
        TAJO-1821: Temporary data is not cleared after TestCatalog. (jihoonson: rev 498769bdeb57c60bd3d7401bbb07c04cb2e97c92)

        • CHANGES
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestLinkedMetadataManager.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.11.0-build #22 (See https://builds.apache.org/job/Tajo-0.11.0-build/22/ ) TAJO-1821 : Temporary data is not cleared after TestCatalog. (jihoonson: rev 498769bdeb57c60bd3d7401bbb07c04cb2e97c92) CHANGES tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestLinkedMetadataManager.java

          People

          • Assignee:
            jihoonson Jihoon Son
            Reporter:
            jihoonson Jihoon Son
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development