Re: unit tests guidelines...

2013-03-14 Thread Chip Childers
On Tue, Mar 05, 2013 at 05:42:55PM -0800, Alex Huang wrote: > With the discussion in the BVT thread and other evidence from the check-ins, > I think there are some confusion on when to and what to write in a unit test. > > Unit tests are a philosophy thing and I usually stay away

Re: unit tests guidelines...

2013-03-06 Thread Prasanna Santhanam
On Wed, Mar 06, 2013 at 07:12:55AM +0530, Alex Huang wrote: > With the discussion in the BVT thread and other evidence from the > check-ins, I think there are some confusion on when to and what to > write in a unit test. > Not just unit-tests alone, most testing in general.

Re: unit tests guidelines...

2013-03-06 Thread Wido den Hollander
On 03/06/2013 02:42 AM, Alex Huang wrote: With the discussion in the BVT thread and other evidence from the check-ins, I think there are some confusion on when to and what to write in a unit test. Unit tests are a philosophy thing and I usually stay away from things like that. If you are

Re: unit tests guidelines...

2013-03-05 Thread Ahmad Emneina
+1 to fostering guruism. On Tue, Mar 5, 2013 at 5:42 PM, Alex Huang wrote: > With the discussion in the BVT thread and other evidence from the > check-ins, I think there are some confusion on when to and what to write in > a unit test. > > Unit tests are a philosophy thing and

unit tests guidelines...

2013-03-05 Thread Alex Huang
With the discussion in the BVT thread and other evidence from the check-ins, I think there are some confusion on when to and what to write in a unit test. Unit tests are a philosophy thing and I usually stay away from things like that. If you are interested in writing the right type unit tests

[jira] [Commented] (CLOUDSTACK-1060) Unit tests that require DB access should not be enabled by default

2013-01-30 Thread Joe San (JIRA)
wing annotation to the test class as below? @Ignore("Requires DB access, so disabling this test") Let me know and I would be happy to submit the patch. > Unit tests that require DB access should not be e

RE: Unit Tests for LoadBalancer functionality in ASF Master

2013-01-29 Thread Rajesh Battala
> -Original Message- > From: Chip Childers [mailto:chip.child...@sungard.com] > Sent: Tuesday, January 29, 2013 10:35 PM > To: cloudstack-dev@incubator.apache.org > Subject: Re: Unit Tests for LoadBalancer functionality in ASF Master > > On Tue, Jan 29, 2013 at 11:

Re: Unit Tests for LoadBalancer functionality in ASF Master

2013-01-29 Thread Chip Childers
On Tue, Jan 29, 2013 at 11:20 AM, Rajesh Battala wrote: > Hi All, > > I have almost done with my feature (AWS Style healthchecks for NetScaler). > I have got paused, how to write unit tests for healthchecks. > > Under cloud-server/test I didn't find any tests for LoadBala

Unit Tests for LoadBalancer functionality in ASF Master

2013-01-29 Thread Rajesh Battala
Hi All, I have almost done with my feature (AWS Style healthchecks for NetScaler). I have got paused, how to write unit tests for healthchecks. Under cloud-server/test I didn't find any tests for LoadBalancer. There are not unit tests which tests the functionality of LB for VR, NetScale

RE: Writing unit tests after javelin is merged in.

2013-01-25 Thread Frank Zhang
rg > Subject: RE: Writing unit tests after javelin is merged in. > > > Frank, > > > > Great! Two questions. > > > > - How does it work when the unit test itself needs a component injected? > > Setup() is only called before the test but not before the unit t

RE: Writing unit tests after javelin is merged in.

2013-01-25 Thread Frank Zhang
> -Original Message- > > From: Frank Zhang [mailto:frank.zh...@citrix.com] > > Sent: Friday, January 25, 2013 5:06 PM > > To: cloudstack-dev@incubator.apache.org > > Subject: RE: Writing unit tests after javelin is merged in. > > > > I think the former ma

RE: Writing unit tests after javelin is merged in.

2013-01-25 Thread Alex Huang
n the setup() method. How does that get loaded? Thanks. --Alex > -Original Message- > From: Frank Zhang [mailto:frank.zh...@citrix.com] > Sent: Friday, January 25, 2013 5:06 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Writing unit tests after javelin is mer

RE: Writing unit tests after javelin is merged in.

2013-01-25 Thread Frank Zhang
age- > From: Frank Zhang [mailto:frank.zh...@citrix.com] > Sent: Friday, January 25, 2013 4:59 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Writing unit tests after javelin is merged in. > > Alex, I feel the wiki you post is too complex to write a unit ca

RE: Writing unit tests after javelin is merged in.

2013-01-25 Thread Frank Zhang
Friday, January 25, 2013 10:25 AM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Writing unit tests after javelin is merged in. > > Hi Howie, > > Thanks for the offer to help. I believe we finally converted all tests > yesterday > but turns out the tests are not running be

RE: Writing unit tests after javelin is merged in.

2013-01-25 Thread Alex Huang
d make any suggestions about how we're using spring in the unit tests. Would love to find a way to stop creating 3 different files for every unit test. Thanks again. --Alex > -Original Message- > From: Howie Yu [mailto:howie...@trend.com.tw] > Sent: Thursday, Janua

Re: Writing unit tests after javelin is merged in.

2013-01-24 Thread Howie Yu
Hi Alex I would like to help~ But which repository should I use? Form github's javelin or asf's javelin ? On 13/1/25 上午8:17, "Alex Huang" wrote: >I wrote up a page on how to write unit tests after the Spring injection >framework is in. Please see here. > >htt

Re: Writing unit tests after javelin is merged in.

2013-01-24 Thread Chiradeep Vittal
after the configure() state in the lifecycle of the manager. On 1/24/13 4:58 PM, "Alex Huang" wrote: >We just discovered that majority of the unit tests have been disabled due >to the build machine can't access the db. Is this correct? > >--Alex > >>

RE: Writing unit tests after javelin is merged in.

2013-01-24 Thread Alex Huang
We just discovered that majority of the unit tests have been disabled due to the build machine can't access the db. Is this correct? --Alex > -Original Message- > From: Alex Huang [mailto:alex.hu...@citrix.com] > Sent: Thursday, January 24, 2013 4:17 PM > T

Writing unit tests after javelin is merged in.

2013-01-24 Thread Alex Huang
I wrote up a page on how to write unit tests after the Spring injection framework is in. Please see here. https://cwiki.apache.org/confluence/display/CLOUDSTACK/Unit+Testing+with+JUnit+and+Spring We also need help in javelin to finish converting the unit tests over to this format. If you can

[jira] [Created] (CLOUDSTACK-1060) Unit tests that require DB access should not be enabled by default

2013-01-24 Thread David Nalley (JIRA)
David Nalley created CLOUDSTACK-1060: Summary: Unit tests that require DB access should not be enabled by default Key: CLOUDSTACK-1060 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1060

[jira] [Commented] (CLOUDSTACK-872) make unit tests depending on a mysql instance conditional

2013-01-12 Thread Noa Resare (JIRA)
that the tests actually doesn't fail, they just print ugly ugly stacktraces. Let's fix this with proper mocking > make unit tests depending on a mysql instance conditional > - > >

[jira] [Created] (CLOUDSTACK-872) make unit tests depending on a mysql instance conditional

2013-01-08 Thread Noa Resare (JIRA)
Noa Resare created CLOUDSTACK-872: - Summary: make unit tests depending on a mysql instance conditional Key: CLOUDSTACK-872 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-872 Project: CloudStack

Re: [DISCUSS]How to write API Unit Tests

2012-11-28 Thread Prasanna Santhanam
> > list > > APIs. > >3) Testcases need to handle tear down test data afterwards. > > > > Thanks > > -min > > > > So unit tests (IMO) should not need external resources to run, should > be very fast, etc as Sudha has ind

Re: [DISCUSS]How to write API Unit Tests

2012-11-28 Thread Min Chen
tps://cwiki.apache.org/CLOUDSTACK/testing-with-python.html >>>>> >>>>> Also check out Rohit's CLI as well. That would also help to automate >>>>>faster >>>>> >>>>> Thanks >>>>> /Sudha >>>>> >

Re: [DISCUSS]How to write API Unit Tests

2012-11-28 Thread Min Chen
testing-with-python.html >>>> >>>> Also check out Rohit's CLI as well. That would also help to automate >>>>faster >>>> >>>> Thanks >>>> /Sudha >>>> >>>> -Original Message- >>>>

Re: [DISCUSS]How to write API Unit Tests

2012-11-28 Thread Rayees Namathponnan
nks >>> /Sudha >>> >>> -Original Message- >>> From: David Nalley [mailto:da...@gnsa.us] >>> Sent: Tuesday, November 27, 2012 5:28 PM >>> To: cloudstack-dev@incubator.apache.org >>> Subject: Re: [DISCUSS]How to write API Unit Tests >&g

Re: [DISCUSS]How to write API Unit Tests

2012-11-28 Thread Min Chen
gt;> >> Thanks >> /Sudha >> >> -Original Message- >> From: David Nalley [mailto:da...@gnsa.us] >> Sent: Tuesday, November 27, 2012 5:28 PM >> To: cloudstack-dev@incubator.apache.org >> Subject: Re: [DISCUSS]How to write API Unit Tests >&

Re: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Chip Childers
: cloudstack-dev@incubator.apache.org > Subject: Re: [DISCUSS]How to write API Unit Tests > > On Tue, Nov 27, 2012 at 6:09 PM, Min Chen wrote: >> Hi there, >> >>In working with API refactoring work, I cannot help wondering >> how we should write Junit test

RE: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Animesh Chaturvedi
: Tuesday, November 27, 2012 5:17 PM To: cloudstack-dev@incubator.apache.org Subject: Re: [DISCUSS]How to write API Unit Tests The idea of not dependent on DB is nice, but I am not sure if this will apply well to this particular LIST api performance refactor code I am working on. In this case

RE: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Sudha Ponnaganti
ember 27, 2012 5:28 PM To: cloudstack-dev@incubator.apache.org Subject: Re: [DISCUSS]How to write API Unit Tests On Tue, Nov 27, 2012 at 6:09 PM, Min Chen wrote: > Hi there, > > In working with API refactoring work, I cannot help wondering > how we should write Junit test c

Re: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread David Nalley
need to handle starting MS and stopping > MS? >2) How should we set up a test DB? This may be needed for those > list > APIs. >3) Testcases need to handle tear down test data afterwards. > > Thanks > -min > So unit tests (IMO) should n

Re: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Min Chen
cloudstack-dev@incubator.apache.org >Subject: Re: [DISCUSS]How to write API Unit Tests > >The idea of not dependent on DB is nice, but I am not sure if this will >apply well to this particular LIST api performance refactor code I am >working on. In this case, the idea is to create Datab

RE: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Sudha Ponnaganti
: Tuesday, November 27, 2012 5:17 PM To: cloudstack-dev@incubator.apache.org Subject: Re: [DISCUSS]How to write API Unit Tests The idea of not dependent on DB is nice, but I am not sure if this will apply well to this particular LIST api performance refactor code I am working on. In this case, the

Re: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Min Chen
sage- >From: Min Chen [mailto:min.c...@citrix.com] >Sent: Tuesday, November 27, 2012 3:10 PM >To: cloudstack-dev@incubator.apache.org >Subject: [DISCUSS]How to write API Unit Tests > >Hi there, > > In working with API refactoring work, I cannot help wondering h

RE: [DISCUSS]How to write API Unit Tests

2012-11-27 Thread Animesh Chaturvedi
Min I have few comments in-line. -Original Message- From: Min Chen [mailto:min.c...@citrix.com] Sent: Tuesday, November 27, 2012 3:10 PM To: cloudstack-dev@incubator.apache.org Subject: [DISCUSS]How to write API Unit Tests Hi there, In working with API refactoring work, I

[DISCUSS]How to write API Unit Tests

2012-11-27 Thread Min Chen
Hi there, In working with API refactoring work, I cannot help wondering how we should write Junit test cases for our APIs. Recently I saw that Chip has merged some of his API unit test cases into master branch, and his api unit test cases are written using Mockito, so no DB and real MS are

Re: Unit tests

2012-11-20 Thread Chip Childers
oard, once it is reviewed and committed the >>> structure will be set and all the units already written are in the new >>> structure. >>> >>> Mani >>> >>> -Original Message- >>> From: Alex Huang [mailto:alex.hu...@citrix.com] &g

Re: Unit tests

2012-11-12 Thread Chip Childers
On Fri, Nov 9, 2012 at 3:24 PM, Alex Huang wrote: > > >> -Original Message- >> From: Alex Huang [mailto:alex.hu...@citrix.com] >> Sent: Friday, November 09, 2012 12:19 PM >> To: cloudstack-dev@incubator.apache.org >> Subject: RE: Unit tests >> &g

RE: Unit tests

2012-11-12 Thread Hugo Trippaers
> -Original Message- > From: Alex Huang [mailto:alex.hu...@citrix.com] > Sent: Friday, November 09, 2012 9:19 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > > >> 2 - Do we want to get stricter about what exactly is considered t

RE: Unit tests

2012-11-12 Thread Hugo Trippaers
> -Original Message- > From: David Nalley [mailto:da...@gnsa.us] > Sent: Friday, November 09, 2012 10:34 PM > To: cloudstack-dev@incubator.apache.org > Subject: Re: Unit tests > > On Fri, Nov 9, 2012 at 2:30 PM, Alex Huang wrote: > > +1 the more tests

Re: Unit tests

2012-11-11 Thread Satoshi Kobayashi
x.hu...@citrix.com] > Sent: Friday, November 09, 2012 12:24 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > > >> -Original Message- >> From: Alex Huang [mailto:alex.hu...@citrix.com] >> Sent: Friday, November 09, 2012 12:19 PM >>

Re: Unit tests

2012-11-10 Thread prasanna
On 10 November 2012 03:03, David Nalley wrote: > On Fri, Nov 9, 2012 at 2:30 PM, Alex Huang wrote: >> +1 the more tests the merrier. >> >> I have noticed that in master doing mvn install actually runs some unit >> tests. I don't like that because it sl

Re: Unit tests

2012-11-10 Thread prasanna
On 10 November 2012 03:03, David Nalley wrote: > On Fri, Nov 9, 2012 at 2:30 PM, Alex Huang wrote: >> +1 the more tests the merrier. >> >> I have noticed that in master doing mvn install actually runs some unit >> tests. I don't like that because it sl

Re: Unit tests

2012-11-09 Thread David Nalley
On Fri, Nov 9, 2012 at 2:30 PM, Alex Huang wrote: > +1 the more tests the merrier. > > I have noticed that in master doing mvn install actually runs some unit > tests. I don't like that because it slows down compilation. I haven't track > down exactly what it i

RE: Unit tests

2012-11-09 Thread Sudha Ponnaganti
: cloudstack-dev@incubator.apache.org Subject: RE: Unit tests > -Original Message- > From: Alex Huang [mailto:alex.hu...@citrix.com] > Sent: Friday, November 09, 2012 12:19 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > > >>

RE: Unit tests

2012-11-09 Thread Alex Huang
> -Original Message- > From: Alex Huang [mailto:alex.hu...@citrix.com] > Sent: Friday, November 09, 2012 12:19 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > > >> 2 - Do we want to get stricter about what exactly is considered t

RE: Unit tests

2012-11-09 Thread Alex Huang
> >> 2 - Do we want to get stricter about what exactly is considered to be > >> a unit test (vs an automated test that may or may not be based on the > >> junit framework)? > > > > I actually consider db tests to be unit tests as long as the db is setup a

Re: Unit tests

2012-11-09 Thread Chip Childers
est that may or may not be based on the >> junit framework)? > > I actually consider db tests to be unit tests as long as the db is setup and > cleaned up by the unit test itself. Having a real DB as a requirement for low level unit tests does two things that I don't like.

RE: Unit tests

2012-11-09 Thread Alex Huang
der db tests to be unit tests as long as the db is setup and cleaned up by the unit test itself. I think anything that requires starting of jetty is definitely not a unit test. --Alex

Re: Unit tests

2012-11-09 Thread Chip Childers
On Fri, Nov 9, 2012 at 2:30 PM, Alex Huang wrote: > +1 the more tests the merrier. > > I have noticed that in master doing mvn install actually runs some unit > tests. I don't like that because it slows down compilation. I haven't track > down exactly what it i

RE: Unit tests

2012-11-09 Thread Alex Huang
+1 the more tests the merrier. I have noticed that in master doing mvn install actually runs some unit tests. I don't like that because it slows down compilation. I haven't track down exactly what it is but I think it's in the nicira plugin. --Alex > -Original Message

Re: Unit tests

2012-11-09 Thread David Nalley
On Fri, Nov 9, 2012 at 2:21 PM, Chip Childers wrote: > I'd like to drop this branch (after moving completed tests over to > master). The reason that I created it was to specifically avoid > messing up the 4.0 work. Since we've moved on already, any issues > integrating the new tests into master?

Re: Unit tests

2012-11-09 Thread Chip Childers
e- >> From: Alex Huang [mailto:alex.hu...@citrix.com] >> Sent: Tuesday, October 30, 2012 9:31 PM >> To: cloudstack-dev@incubator.apache.org >> Subject: RE: Unit tests >> >> Matthew, >> >> Are you looking to write unit tests for which set of APIs? I

Re: Unit tests

2012-10-30 Thread Matthew Morrissey
October 30, 2012 9:31 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > Matthew, > > Are you looking to write unit tests for which set of APIs? Is it the > management server APIs, plugin APIs, or resource APIs? > > Yup. Hugo's path is the corr

RE: Unit tests

2012-10-30 Thread Manikanta Kattamuri
Message- From: Alex Huang [mailto:alex.hu...@citrix.com] Sent: Tuesday, October 30, 2012 9:31 PM To: cloudstack-dev@incubator.apache.org Subject: RE: Unit tests Matthew, Are you looking to write unit tests for which set of APIs? Is it the management server APIs, plugin APIs, or resource APIs

RE: Unit tests

2012-10-30 Thread Alex Huang
Matthew, Are you looking to write unit tests for which set of APIs? Is it the management server APIs, plugin APIs, or resource APIs? Yup. Hugo's path is the correct one. --Alex > -Original Message- > From: Hugo Trippaers [mailto:htrippa...@schubergphilis.com] >

Re: Unit tests

2012-10-30 Thread Matthew Morrissey
Done and done. I'll start work ASAP :) On Tue, Oct 30, 2012 at 11:02 AM, Hugo Trippaers < htrippa...@schubergphilis.com> wrote: > Hey Matthew, > > Go go go ! > > Put please put the tests in /test/com/cloud/ That > would keep it compatible with the existing loc

RE: Unit tests

2012-10-30 Thread Hugo Trippaers
Hey Matthew, Go go go ! Put please put the tests in /test/com/cloud/ That would keep it compatible with the existing location for unit tests and make it work with maven right away :-) Cheers, HUgo > -Original Message- > From: Matthew Morrissey [mailto:matthew.

Unit tests

2012-10-30 Thread Matthew Morrissey
Hello all, I would like to begin writing unit tests for api/src/com/cloud/api and I wanted to make sure that 1) it's an acceptable idea to everyone and 2) I get the directory structure correct. I have seen a few emails about the possible structure but no concrete "this is the way t

RE: Folder structure for unit-tests

2012-10-23 Thread Edison Su
> -Original Message- > From: Manikanta Kattamuri [mailto:manikanta.kattam...@sungard.com] > Sent: Tuesday, October 23, 2012 1:05 PM > To: cloudstack-dev@incubator.apache.org > Subject: Folder structure for unit-tests > > Hi All, > > > > While I was se

Re: Folder structure for unit-tests

2012-10-23 Thread Chip Childers
On Tue, Oct 23, 2012 at 4:05 PM, Manikanta Kattamuri wrote: > Hi All, > > > > While I was setting up for writing test cases I came up with some placing > issues. > > > > The source code of the projects are in src folder and in pom.xml > is specified > > Approach 1: > > If need to place the testca

Folder structure for unit-tests

2012-10-23 Thread Manikanta Kattamuri
Hi All, While I was setting up for writing test cases I came up with some placing issues. The source code of the projects are in src folder and in pom.xml is specified Approach 1: If need to place the testcase files I should not change the present structure and create a new folder test an

Re: Review Request: Another batch of unit tests for the api project

2012-10-23 Thread Chip Childers
>> From: Yichi Lu [mailto:nore...@reviews.apache.org] On Behalf Of Yichi Lu >> Sent: Thursday, October 04, 2012 2:09 AM >> To: cloudstack; Yichi Lu >> Subject: Re: Review Request: Another batch of unit tests for the api project >> >> >> ---

Re: Review Request: Another batch of unit tests for the api project

2012-10-23 Thread Chip Childers
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7427/#review12682 --- Ship it! This was committed into the junit-test branch. Please mark

Re: Review Request: Another batch of unit tests for the api project

2012-10-23 Thread Chip Childers
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7427/#review12683 --- Ship it! This was committed into the junit-test branch. Please mark

Re: Review Request: Another batch of unit tests for the api project

2012-10-23 Thread Chip Childers
Yichi Lu > Subject: Re: Review Request: Another batch of unit tests for the api project > > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7427/ > -

RE: Review Request: Another batch of unit tests for the api project

2012-10-23 Thread Manikanta Kattamuri
Yichi Lu Sent: Thursday, October 04, 2012 2:09 AM To: cloudstack; Yichi Lu Subject: Re: Review Request: Another batch of unit tests for the api project --- This is an automatically generated e-mail. To reply, visit: https

Re: Review Request: Another batch of unit tests for the api project

2012-10-03 Thread Yichi Lu
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7427/ --- (Updated Oct. 3, 2012, 8:39 p.m.) Review request for cloudstack. Changes -

Review Request: Another batch of unit tests for the api project

2012-10-03 Thread Yichi Lu
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7427/ --- Review request for cloudstack. Description --- another batch of junit tests

Re: Review Request: A batch of new unit tests for api project

2012-09-28 Thread Chip Childers
b3bf5b6ccdd424cc7cb4a972b6b86a706c79a00d Author: Yichi Lu Date: Fri Sep 28 10:59:36 2012 -0400 A batch of new unit tests for api project. https://reviews.apache.org/r/7302/ Signed-off-by: Chip Childers Please close this review as submitted. Thanks! - Chip Childers On Sept. 28, 2012, 2:55 p.m., Yichi Lu wrote

Re: Review Request: A batch of new unit tests for api project

2012-09-28 Thread Yichi Lu
--- Added ASF license headers, added more unit tests. Description --- A batch of new unit tests for api project. Diffs (updated) - api/unittest/src/com/cloud/agent/api/AgentControlAnswerTest.java PRE-CREATION api/unittest/src/com/cloud/agent/api/AgentControlCommandTest.java

Review Request: A batch of new unit tests for api project

2012-09-26 Thread Yichi Lu
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7302/ --- Review request for cloudstack. Description --- A batch of new unit tests

Re: unit tests for api/src/com/cloud/agent/api

2012-09-20 Thread Prasanna Santhanam
> > We can speed up the tests. Just never got to have marvin drive > > everything asynchronously.It's been on my TODO list forever now as > > have the API tests. I for one would be extremely happy to see some. > > I am gonna look into the speed up. Where you thinking of threading > it or using nos

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread Sebastien Goasguen
great! >>> >> >> While I like the functional/integration tests, as you note we have >> 500+ currently. Those tests also take many hours to run at present. >> Unit tests should be something fast, a sanity check, and we only have >> 25 right now for the entire code

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread Yichi Lu
like the functional/integration tests, as you note we have > >> 500+ currently. Those tests also take many hours to run at present. > >> Unit tests should be something fast, a sanity check, and we only have > >> 25 right now for the entire code base, so while I like > >

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread prasanna
d 500+ test cases, or maybe more, but apparently it's >>> not enough. If you like to work on it, that will be great! >>> >> >> While I like the functional/integration tests, as you note we have >> 500+ currently. Those tests also take many hours to run at p

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread prasanna
the test cases written for this >> framework. >> We already have around 500+ test cases, or maybe more, but apparently it's >> not enough. If you like to work on it, that will be great! >> > > While I like the functional/integration tests, as you note we have > 500+

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread prasanna
up >> a test infrastructure, which will execute all the test cases written for >> this framework. >> > We already have around 500+ test cases, or maybe more, but apparently >> it's not enough. If you like to work on it, that will be great! >> > >> >

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread Yichi Lu
I think so. JUnit probably is a better way at this point. Yichi On Tue, Sep 18, 2012 at 11:32 AM, Chip Childers wrote: > Yichi, > > Would more traditional unit tests (using JUnit and moc'ed > dependencies) perhaps be a better way to get to unit test coverage? > (As oppose

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread Chip Childers
Yichi, Would more traditional unit tests (using JUnit and moc'ed dependencies) perhaps be a better way to get to unit test coverage? (As opposed to other automated test types) -chip On Tue, Sep 18, 2012 at 12:27 PM, Yichi Lu wrote: > So I folllowed the doc: > https://cwiki

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread Yichi Lu
nvironment. And we are setting up > a test infrastructure, which will execute all the test cases written for > this framework. > > We already have around 500+ test cases, or maybe more, but apparently > it's not enough. If you like to work on it, that will be great! > > > >

Re: unit tests for api/src/com/cloud/agent/api

2012-09-18 Thread David Nalley
t cases, or maybe more, but apparently it's > not enough. If you like to work on it, that will be great! > While I like the functional/integration tests, as you note we have 500+ currently. Those tests also take many hours to run at present. Unit tests should be something fast, a sanity ch

RE: unit tests for api/src/com/cloud/agent/api

2012-09-17 Thread Edison Su
ll be great! > -Original Message- > From: Yichi Lu [mailto:yichi...@sungard.com] > Sent: Monday, September 17, 2012 2:56 PM > To: cloudstack-dev@incubator.apache.org > Subject: unit tests for api/src/com/cloud/agent/api > > I'd start to write unit tests for class

RE: unit tests for api/src/com/cloud/agent/api

2012-09-17 Thread Sudha Ponnaganti
+1 Awesome indeed!! Looking forward for it -Original Message- From: David Nalley [mailto:da...@gnsa.us] Sent: Monday, September 17, 2012 3:08 PM To: cloudstack-dev@incubator.apache.org Subject: Re: unit tests for api/src/com/cloud/agent/api On Mon, Sep 17, 2012 at 5:56 PM, Yichi Lu

Re: unit tests for api/src/com/cloud/agent/api

2012-09-17 Thread David Nalley
On Mon, Sep 17, 2012 at 5:56 PM, Yichi Lu wrote: > I'd start to write unit tests for classes in api/src/com/cloud/agent/api in > alphabetical order. > > Let me know if you have any suggestions. > > Yichi Lu AWESOME - terribly excited to see this! --David

unit tests for api/src/com/cloud/agent/api

2012-09-17 Thread Yichi Lu
I'd start to write unit tests for classes in api/src/com/cloud/agent/api in alphabetical order. Let me know if you have any suggestions. Yichi Lu

RE: Unit tests

2012-08-16 Thread Alex Huang
> -Original Message- > From: Alex Huang > Sent: Thursday, August 16, 2012 4:48 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > > > -Original Message- > > From: Sudha Ponnaganti [mailto:sudha.ponnaga...@citrix.com] >

RE: Unit tests

2012-08-16 Thread Alex Huang
> -Original Message- > From: Sudha Ponnaganti [mailto:sudha.ponnaga...@citrix.com] > Sent: Thursday, August 16, 2012 4:27 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Unit tests > > +1 > It would be good if patch reviewers can ask for unit tests

RE: Unit tests

2012-08-16 Thread Sudha Ponnaganti
+1 It would be good if patch reviewers can ask for unit tests for defect / feature submissions during review process -Original Message- From: Ewan Mellor [mailto:ewan.mel...@eu.citrix.com] Sent: Thursday, August 16, 2012 4:15 PM To: cloudstack-dev@incubator.apache.org Subject: RE: Unit

RE: Unit tests

2012-08-16 Thread Ewan Mellor
Thanks Chiradeep! We now have completely passing unit-tests on master for the first time! We should keep it this way. I will enable email notifications on that Jenkins job so that we will know when they break. I suggest though, that we make it a criterion for any patch being submitted for

Re: Unit tests

2012-08-16 Thread David Nalley
ot;Ewan Mellor" wrote: > >>http://jenkins.cloudstack.org/job/test-junit, by the way. >> >>Ewan. >> >>From: Ewan Mellor >>Sent: 10 August 2012 16:36 >>To: cloudstack-dev@incubator.apache.org >>Subject: Unit tests >> >>We are down to t

Re: Unit tests

2012-08-16 Thread Chiradeep Vittal
v@incubator.apache.org >Subject: Unit tests > >We are down to the last two unit test failures (thanks to Mice for his >recent patch which dealt with two others). > >The failures are: >com.cloud.agent.manager.ResourceManagerTest.testDeploy100Hosts (reliable) >and >co

RE: Unit tests

2012-08-10 Thread Ewan Mellor
http://jenkins.cloudstack.org/job/test-junit, by the way. Ewan. From: Ewan Mellor Sent: 10 August 2012 16:36 To: cloudstack-dev@incubator.apache.org Subject: Unit tests We are down to the last two unit test failures (thanks to Mice for his recent patch which dealt with two others). The

Unit tests

2012-08-10 Thread Ewan Mellor
We are down to the last two unit test failures (thanks to Mice for his recent patch which dealt with two others). The failures are: com.cloud.agent.manager.ResourceManagerTest.testDeploy100Hosts (reliable) and com.cloud.utils.net.NetUtilsTest.testGetRandomIpFromCidr (50% intermittent) Full error

Re: guide to writing unit tests

2012-08-08 Thread Mice Xia
Hi Chiradeep, I'm about to write a unit test for CS-15609, as you suggested in the review thread. However it seems a little bit heavy weight if follow the guide you posted: 1) About IoC, I had to inject all dependent DAOs/Managers for the class under test, even if I want to test one method whic

guide to writing unit tests

2012-07-26 Thread Chiradeep Vittal
This has always been there. Just surfacing it. http://wiki.cloudstack.org/display/COMM/Unit+Testing+101