brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Updates monit test to explicitly ...
Date Wed, 15 Oct 2014 10:48:56 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/241#discussion_r18886318
  
    --- Diff: software/monitoring/src/test/java/brooklyn/entity/monitoring/monit/MonitIntegrationTest.java
---
    @@ -49,37 +50,26 @@
     import com.google.common.io.Files;
     
     public class MonitIntegrationTest extends BrooklynAppLiveTestSupport {
    -    
    -    /*
    -     * FIXME Has the monit node output changed? Now it is listing 'cron' as well as system.
    -     * It keeps reporting "Does" rather than "Running" as the status.
    -     * Should we be getting the rest of the line after "status" (and trimming), rather
than
    -     * just the first word?
    -
    -    input=The Monit daemon 5.9 uptime: 0m
    -            Process 'cron'
    -              status                            Does not exist
    -              monitoring status                 Monitored
    -              data collected                    Mon, 13 Oct 2014 21:27:01
    -            System 'aleds-macbook-pro.local'
    -              status                            Running
    -              monitoring status                 Monitored
    -              load average                      [5.16] [4.73] [4.45]
    -              cpu                               7.1%us 5.7%sy
    -              memory usage                      11.6 GB [72.3%]
    -              swap usage                        3.0 GB [74.7%]
    -              data collected                    Mon, 13 Oct 2014 21:27:01
     
    -     */
    -    
         private static final Logger LOG = LoggerFactory.getLogger(MonitIntegrationTest.class);
         
         LocalhostMachineProvisioningLocation loc;
    +    Process testProcess;
         
         @BeforeMethod(alwaysRun=true)
         public void setUp() throws Exception {
             super.setUp();
             loc = app.newLocalhostProvisioningLocation();
    +        testProcess = (new ProcessBuilder()).command("vi", "monittest").start();
    --- End diff --
    
    Personal preference would be to have used a filename that included a random id, to ensure
that tests can never interfere with each other. But this should be ok, as our tests are not
run in parallel and tearDown looks ok (as long as `super.tearDown` doesn't throw an exception,
given it's not in a try-finally block!)


---
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