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: Couchbase sync gateway
Date Wed, 09 Jul 2014 10:15:08 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/25#discussion_r14702346
  
    --- Diff: software/nosql/src/test/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
---
    @@ -0,0 +1,114 @@
    +package brooklyn.entity.nosql.couchbase;
    +
    +import java.util.List;
    +import java.util.Map;
    +
    +import org.testng.annotations.Test;
    +
    +import brooklyn.entity.AbstractEc2LiveTest;
    +import brooklyn.entity.group.DynamicCluster;
    +import brooklyn.entity.proxying.EntitySpec;
    +import brooklyn.entity.trait.Startable;
    +import brooklyn.location.Location;
    +import brooklyn.test.EntityTestUtils;
    +
    +import com.google.common.collect.ImmutableList;
    +import com.google.common.collect.ImmutableMap;
    +
    +@Test
    +public class CouchbaseSyncGatewayEc2LiveTest extends AbstractEc2LiveTest {
    +
    +    @Override
    +    protected void doTest(Location loc) throws Exception {
    +        CouchbaseCluster cluster = app.createAndManageChild(EntitySpec.create(CouchbaseCluster.class)
    +            .configure(CouchbaseNode.COUCHBASE_ADMIN_USERNAME, "Administrator")
    +            .configure(CouchbaseNode.COUCHBASE_ADMIN_PASSWORD, "Password")
    +            .configure(DynamicCluster.INITIAL_SIZE, 3)
    +            .configure(CouchbaseCluster.CREATE_BUCKETS, (List<Map<String,Object>>)ImmutableList.of(
    +                (Map<String,Object>)ImmutableMap.<String, Object>of(
    +                    "bucket", "default",
    +                    "bucket-ramsize", 100,
    +                    "bucket-type", "couchbase",
    +                    "bucket-port", 11211
    +                ),
    +                (Map<String,Object>)ImmutableMap.<String, Object>of(
    +                    "bucket", "my_bucket",
    +                    "bucket-ramsize", 100,
    +                    "bucket-type", "couchbase",
    +                    "bucket-port", 11223
    +                ),
    +                (Map<String,Object>)ImmutableMap.<String, Object>of(
    +                    "bucket", "another",
    +                    "bucket-ramsize", 100,
    +                    "bucket-type", "couchbase",
    +                    "bucket-port", 11224
    +                ))
    +            )
    +        );
    +        CouchbaseSyncGateway gateway = app.createAndManageChild(EntitySpec.create(CouchbaseSyncGateway.class)
    +            .configure(CouchbaseSyncGateway.COUCHBASE_SERVER, cluster)
    +            .configure(CouchbaseSyncGateway.COUCHBASE_SERVER_BUCKET, "my_bucket")
    +        );
    +        
    +        app.start(ImmutableList.of(loc));
    +        
    +        EntityTestUtils.assertAttributeEqualsEventually(gateway, Startable.SERVICE_UP,
true);
    +    }
    +    
    +    
    +    // Supported operating systems
    +    
    +    @Override
    --- End diff --
    
    If overriding, I think you need the test groups to be declared again. With the `@Test`
annotation at the top, will these tests now be run as unit tests rather than just live tests?


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