brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fix failing tests
Date Fri, 11 Jul 2014 05:44:07 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/61#discussion_r14807613
  
    --- Diff: utils/common/src/test/java/brooklyn/util/os/OsTest.java ---
    @@ -84,5 +88,49 @@ public void testMergePaths() throws Exception {
             assertEquals(Os.mergePaths("a", "b/"), "a/b/");
             assertEquals(Os.mergePaths("/a", "b"), "/a/b");
         }
    +    
    +    @Test
    +    public void testNewTempFile() {
    +        int CREATE_CNT = 1500;
    +        Collection<File> folders = new ArrayList<File>(CREATE_CNT);
    +        
    +        try {
    +            for (int i = 0; i < CREATE_CNT; i++) {
    +                try {
    +                    folders.add(Os.newTempFile(OsTest.class, "test"));
    +                } catch (IllegalStateException e) {
    +                    log.warn("testNewTempFile failed at " + i + " iteration.");
    +                    Exceptions.propagate(e);
    +                }
    +            }
    +        } finally {
    +            //cleanup
    +            for (File folder : folders) {
    +                folder.delete();
    +            }
    +        }
    +    }
    +    
    +    @Test
    +    public void testNewTempDir() {
    --- End diff --
    
    again, should be `groups="Integration"` unless your file system is very very fast?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message