Hi Min, That's one solution. Another is to add a sleep. It all depends on what you're trying to test.
There an issue with another test where the sleep is set to 1001. IIRC, I changed that to 1020 or thereabouts. These are in the patch that I've been trying to commit. DL > -----Original Message----- > From: Min Chen [mailto:min.c...@citrix.com] > Sent: 28 January 2013 17:24 > To: cloudstack-dev@incubator.apache.org > Subject: Re: Jira Issue for Unit Test Fail? (ApiRateLimitTest) > > Hi Donal, thanks for pointing to that link, was not aware of this on Windows. > > A simple fix is to change last line of the test as > > assertTrue("expiredAfter is incorrect", response.getExpireAfter() <= > 1000); > > Is it possible for you to quickly verify on your setup to see if it works? > > Thanks > -min > > > > On 1/28/13 6:39 AM, "Donal Lafferty" <donal.laffe...@citrix.com> wrote: > > >Looks like an edge case. > > > >The test takes 0 seconds as measured by System.currentTimeMillis(), > >because the server is fast and Windows has limited accuracy. See > >https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks > > > >I'll added a 10ms sleep to the test. > > > > > >DL > > > >> -----Original Message----- > >> From: Min Chen [mailto:min.c...@citrix.com] > >> Sent: 27 January 2013 17:21 > >> To: cloudstack-dev@incubator.apache.org > >> Cc: cloudstack-dev@incubator.apache.org > >> Subject: Re: Jira Issue for Unit Test Fail? (ApiRateLimitTest) > >> > >> Thanks Donal for reporting that issue. That is one of my unit > >>testcases, since I am using mac, it is always working fine for me. > >>Does anybody out there using windows experience the same issue? > >> > >> -min > >> > >> Sent from my iPhone > >> > >> On Jan 27, 2013, at 7:20 AM, "Donal Lafferty" > >><donal.laffe...@citrix.com> > >> wrote: > >> > >> > I have a couple of these, and I think they have to do with using a > >>Windows > >> environment. > >> > > >> > For the one discussed below, I have no domain knowledge. It seems > >> > a > >> better idea to get in touch with a developer, which I did by looking > >>at the github to see who was committing changes. > >> > > >> > The other failing unit test is in the 'cloud-agent'. Here, I have > >>enough > >> knowledge to figure out the problem, or at least narrow down the cause. > >> > > >> > WRT to blocking, these tests aren't something that I rely on. > >>However, as a > >> good citizen, I've a duty to publish some sort of work around. > >> > > >> > DL > >> > > >> > > >> >> -----Original Message----- > >> >> From: prasanna [mailto:srivatsav.prasa...@gmail.com] On Behalf Of > >> >> Prasanna Santhanam > >> >> Sent: 27 January 2013 06:29 > >> >> To: cloudstack-dev@incubator.apache.org > >> >> Subject: Re: Jira Issue for Unit Test Fail? (ApiRateLimitTest) > >> >> > >> >> On Sat, Jan 26, 2013 at 05:25:57PM -0500, Donal Lafferty wrote: > >> >>> I cloned Master to make sure I could build with 'mvn install build' > >> >>> in Cygwin (in a Windows development environment) > >> >>> > >> >>> In the cloud-plugin-api-limit-account-based, the ApiRateLimitTest > >> >>> fails with message: Failed tests: > >> >>> > >>verifySearchCounter(org.apache.cloudstack.ratelimit.ApiRateLimitTest): > >> >>> expiredAfter is incorrect > >> >>> > >> >>> This isn't a known Windows issue, i.e. nothing noted at > >> >>> https://cwiki.apache.org/CLOUDSTACK/setting-up-a-cloudstack-dev- > >> >> enviro > >> >>> nment-on-windows.html > >> >>> > >> >>> Should I contact the developer directly, create an issue in Jira, > >> >>> both, or something else? > >> >>> > >> >> I'm able to build fine with latest master (ddb794d) with mvn clean > >> >> install. The build appears good too - > >> >> https://builds.apache.org/view/A- F/view/Cloudstack/ > >> >> > >> >> But for your question - you may post a ticket on jira and alert > >> >> the list if it's blocking you. Or better yet if you can fix it and > >> >> raise an rb request with your fix you get instant karma. :) > >> >> > >> >> -- > >> >> Prasanna.,