You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "David Alves (JIRA)" <ji...@apache.org> on 2011/02/28 22:03:36 UTC

[jira] Created: (WHIRR-243) Allow to run component tests in isolation from JClouds

Allow to run component tests in isolation from JClouds
------------------------------------------------------

                 Key: WHIRR-243
                 URL: https://issues.apache.org/jira/browse/WHIRR-243
             Project: Whirr
          Issue Type: Improvement
          Components: core
            Reporter: David Alves
            Priority: Minor


While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.

So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000826#comment-13000826 ] 

David Alves commented on WHIRR-243:
-----------------------------------

Adrien

I applied your patch and even though now I can see that the nodes start in the expected order in the logs, its hard to make assertions on this starting order. The previous maintained state on which nodes were started at which time. (grouped them in runs one for each instance template). How can this be done now?

Reading/writing cluster state is a feature I also require for WHIRR-214, and Tom suggested that this could be done by reading the "~/.whirr/cluster-name/instances" file. On the other hand you suggested that cluster state could also be written/read to/from the cluster itself. Maybe we should create a more permanent way to read/write cluster state that could start by using the instances file and alternatively use the cluster itself, as you also suggested (if the cluster is to be responsible for its own scaling up/down ops. state must be stored there).

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WHIRR-243) Allow to run component tests in memory

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

Updated patch for the current trunk.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001267#comment-13001267 ] 

David Alves commented on WHIRR-243:
-----------------------------------

Hey, nice polishings!

No, it does what I require, i.e. is allows to make assertions on which actions were performed on which nodes and on which order. 

Nice work, thanks!

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001414#comment-13001414 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

I'd like to have one person besides us try this out before committing.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000551#comment-13000551 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

your patch is certainly useful, so I'll make a fusion between the two.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Cole updated WHIRR-243:
------------------------------

    Summary: Allow to run component tests in memory  (was: Allow to run component tests in isolation from JClouds)

I think the point is running tests in memory and not against a machine.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000826#comment-13000826 ] 

David Alves edited comment on WHIRR-243 at 3/1/11 11:07 AM:
------------------------------------------------------------

Adrien

I applied your patch and even though now I can see that the nodes start in the expected order in the logs, its hard to make assertions on this starting order. The previous patch maintained state on which nodes were started at which time. (grouped them in runs one for each instance template). How can this be done now?

Reading/writing cluster state is a feature I also require for WHIRR-214, and Tom suggested that this could be done by reading the "~/.whirr/cluster-name/instances" file. On the other hand you suggested that cluster state could also be written/read to/from the cluster itself. Maybe we should create a more permanent way to read/write cluster state that could start by using the instances file and alternatively use the cluster itself, as you also suggested (if the cluster is to be responsible for its own scaling up/down ops. state must be stored there).

      was (Author: dr-alves):
    Adrien

I applied your patch and even though now I can see that the nodes start in the expected order in the logs, its hard to make assertions on this starting order. The previous maintained state on which nodes were started at which time. (grouped them in runs one for each instance template). How can this be done now?

Reading/writing cluster state is a feature I also require for WHIRR-214, and Tom suggested that this could be done by reading the "~/.whirr/cluster-name/instances" file. On the other hand you suggested that cluster state could also be written/read to/from the cluster itself. Maybe we should create a more permanent way to read/write cluster state that could start by using the instances file and alternatively use the cluster itself, as you also suggested (if the cluster is to be responsible for its own scaling up/down ops. state must be stored there).
  
> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000536#comment-13000536 ] 

David Alves commented on WHIRR-243:
-----------------------------------

Hi Adrien

I apologize if I have duplicated any of the features of jclouds. I confess jclouds has become really huge and I haven't had the time to dig into it as deep as I'd like.

Anyway do you think the patch is still useful as it is, or would you recommend a rewrite as per your suggestions?


> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

changed patch as per Tom's recommendations (no @author tags, and two space indentation)

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Cole reassigned WHIRR-243:
---------------------------------

    Assignee: Adrian Cole

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001446#comment-13001446 ] 

David Alves commented on WHIRR-243:
-----------------------------------

Already merged. Latest and (hopefully) final version is WHIRR-243.patch.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Cole updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

here's the latest patch.  notice that we are now naming tasks, so regardless of whether we are running live or stub, output should be more meaningful.



> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243-only-LogDryRunModule.patch

simple patch only to the LogDryRunModule class.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000884#comment-13000884 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

I've added task naming, which should make the logs much more meaningful.  Also, there's an existing jclouds-compute.log (from logger jclouds.compute).  Perhaps while in stub mode, we should assign this to console for more info?

Glad to add more code, but I wanted your feedback first.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003618#comment-13003618 ] 

Tom White commented on WHIRR-243:
---------------------------------

Sorry for the slow response. I'm getting a NPE when running the unit tests:

{noformat}
testDoActionRetriesSucceed(org.apache.whirr.cluster.actions.BootstrapClusterActionTest)  Time elapsed: 3.309 sec  <<< ERROR!
java.lang.NullPointerException
        at org.apache.whirr.cluster.actions.BootstrapClusterAction.doAction(BootstrapClusterAction.java:115)
        at org.apache.whirr.cluster.actions.ScriptBasedClusterAction.execute(ScriptBasedClusterAction.java:74)
        at org.apache.whirr.cluster.actions.BootstrapClusterActionTest.testDoActionRetriesSucceed(BootstrapClusterActionTest.java:136)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)

{noformat}

Also, the indentation in ComputeServiceContextBuilder is still 3 spaces.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001224#comment-13001224 ] 

David Alves commented on WHIRR-243:
-----------------------------------

Sample use of what can be done with the result:

Executed: bootstrap-role3 in test-8e7
Executed: bootstrap-role3 in test-2a5
Executed: bootstrap-role4_role5 in test-9fe
Executed: bootstrap-role4_role5 in test-ef8
Executed: bootstrap-role4_role5 in test-a0d
Executed: bootstrap-role1_role2 in test-644
Executed: configure-role1_role2 in test-644
Executed: configure-role3 in test-8e7
Executed: configure-role3 in test-2a5
Executed: configure-role4_role5 in test-a0d
Executed: configure-role4_role5 in test-a0d
Executed: configure-role4_role5 in test-9fe
Executed: configure-role4_role5 in test-9fe
Executed: configure-role4_role5 in test-ef8
Executed: configure-role4_role5 in test-ef8

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Cole updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

mainly polishing.

David, is there anywhere else you'd like to take this?

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001223#comment-13001223 ] 

David Alves commented on WHIRR-243:
-----------------------------------

I've changed the LogDryRunModule class and added a DryRun static object that stores which scripts were executed on which nodes and on which order. The DryRun is filled by an interceptor to RunScriptOnNodes.Factory.create(). I know the create() method is called before scipt execution, but in a stub environment maybe we can assume the script will be executed.

Open to suggestions on a better way to do it, but solved my problem :)

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in isolation from JClouds

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

Forgot to grant license

> Allow to run component tests in isolation from JClouds
> ------------------------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in isolation from JClouds

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

> Allow to run component tests in isolation from JClouds
> ------------------------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000532#comment-13000532 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

p.s. if you want to avoid passing an instance of a test expectation module (ex. to avoid whirr from needing to expose a means to pass a module), you can also do this via the property "jclouds.modules"

see http://code.google.com/p/jclouds/wiki/UsingGoogleAppEngine#Using_property-based_configuration for an example

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in isolation from JClouds

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated WHIRR-243:
------------------------------

    Status: Patch Available  (was: Open)

Adds the option of building a "test" (assigned statically) provider to the ComputeServiceContextBuilder as well as the StubComputeServiceContext/StubComputeService itself.

The Stubs are not complete, i.e. they just have the features I needed so far. 

> Allow to run component tests in isolation from JClouds
> ------------------------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in isolation from JClouds

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated WHIRR-243:
------------------------------

    Attachment:     (was: WHIRR-243.patch)

> Allow to run component tests in isolation from JClouds
> ------------------------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in isolation from JClouds

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000525#comment-13000525 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

I wouldn't recommend creating a different impl for testing, as it is redundant to the existing jclouds stub.

it is possible to use the jclouds stub to test runScriptOnNodes type of behaviour.  In fact, that's what it is used for in our test case:
https://github.com/jclouds/jclouds/blob/master/compute/src/test/java/org/jclouds/compute/StubComputeServiceIntegrationTest.java

Main idea is that the stub provider exposes the lifecycle functionality.  if you want to test scripts, you have to supply expectation behaviour.  This would be assigned via a guice module you'd pass during createContext()

 ex. ComputeServiceContextFactory().createContext("stub",
            ImmutableSet.<Module> of(new HBaseTestExpectationsModule()), new Properties());

In this test module, you'd need to bind 2 things, SocketOpen and SshClient.Factory

I'd expect you'd like to just tell SocketOpen to always return true;  SocketOpen is called directly before a ssh connection is attempted.

To bind SocketOpen to always true, add this to your configure method of the module extending com.google.inject.AbstractModule

     bind(SocketOpen.class).toInstance(new SocketOpen() {

         @Override
         public boolean apply(IPSocket arg0) {
            return true;
         }

      });
    
The ssh factory is important.  it is here that you can test your expectations properly, as we do in the above test.  factory.create will be called for any script execution, whether it is during createNode or runScriptOnNodesMatching.  You can feel free to not use mocks and use some sort of hash = return map, but this is where to hook in.  I'd recommend paying attention to order when it matters.


At the end of the day, the only code you'd need to maintain would be the ssh expectations, which is the point in the first place, I believe.  I hope this helps.

> Allow to run component tests in isolation from JClouds
> ------------------------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Priority: Minor
>         Attachments: WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Cole updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

another version of the patch which shows how to hook in and log things like node name

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001775#comment-13001775 ] 

Tom White commented on WHIRR-243:
---------------------------------

I had a quick look at this and it looks fine generally. A couple of minor things that I would like to see fixed before commit: the indentation in LogDryRunModule should be two spaces, not three; and there shouldn't be any @author tags.

Looking forward to seeing how this will be used.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Savu updated WHIRR-243:
------------------------------

    Fix Version/s: 0.5.0

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000604#comment-13000604 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

tested the attached patch on hbase and cassandra.  david, this was a really good idea logging to info.  you're right, it is much easier to see the order of execution.  Note that I did class lookup by name as that way there's no hard dependency on test classes.

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Andrei Savu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001415#comment-13001415 ] 

Andrei Savu commented on WHIRR-243:
-----------------------------------

I will take a look now over this patch (WHIRR-243.patch submitted on 02/Mar/11 03:48) Should I also review WHIRR-243-only-LogDryRunModule.patch or was it already merged?

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>             Fix For: 0.5.0
>
>         Attachments: WHIRR-243-only-LogDryRunModule.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Cole updated WHIRR-243:
------------------------------

    Attachment: WHIRR-243.patch

new patch using existing jclouds stub impl

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WHIRR-243) Allow to run component tests in memory

Posted by "Adrian Cole (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WHIRR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001100#comment-13001100 ] 

Adrian Cole commented on WHIRR-243:
-----------------------------------

please note that there's a open jclouds task to incorporate anything we can to reduce this type of issue moving forward
http://code.google.com/p/jclouds/issues/detail?id=490

> Allow to run component tests in memory
> --------------------------------------
>
>                 Key: WHIRR-243
>                 URL: https://issues.apache.org/jira/browse/WHIRR-243
>             Project: Whirr
>          Issue Type: Improvement
>          Components: core
>            Reporter: David Alves
>            Assignee: Adrian Cole
>            Priority: Minor
>         Attachments: WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch, WHIRR-243.patch
>
>
> While jclouds now features the awesome BYON mode it might be useful to be able to run compoenent and systems tests without jclouds.
> I tried jclouds stub features but unless I'm missing something (I might) there is no way of stubbing a compute service that allows to call runOnNodesMatching.
> So my idea is to alter ComputeServiceContextBuilder a bit to account for a new provider ("test") in which case an instance of a StubComputeServiceContext is returned (which features a StubComputeService internal class). This allows to make assertion regarding which nodes were started or not and on which order, which I think is useful.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira