[gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Szczepan Faber
Hey, How do we avoid sleeps in incremental compilation integ tests? My initial batch of integ tests for java incremental compilation uses Thread.sleep and file.lastModified to verify which files were actually recompiled. It seems tricky to avoid the sleep. If I use file hash/size instead of lastMo

Re: [gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Radim Kubacki
On Thu, Apr 3, 2014 at 12:36 PM, Szczepan Faber < szczepan.fa...@gradleware.com> wrote: > Hey, > > How do we avoid sleeps in incremental compilation integ tests? My initial > batch of integ tests for java incremental compilation uses Thread.sleep and > file.lastModified to verify which files were

Re: [gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Daz DeBoer
In the native incremental compile tests (1), we're doing an initial compile, setting the last modified date to '0' for all compiled outputs, then compiling again. We can then check the last modified date to see which files were actually recompiled. It's not particularly pretty, but it's working. D

Re: [gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Adam Murdoch
On 3 Apr 2014, at 9:36 pm, Szczepan Faber wrote: > Hey, > > How do we avoid sleeps in incremental compilation integ tests? My initial > batch of integ tests for java incremental compilation uses Thread.sleep and > file.lastModified to verify which files were actually recompiled. It seems > t

Re: [gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Adam Murdoch
On 4 Apr 2014, at 12:11 am, Daz DeBoer wrote: > In the native incremental compile tests (1), we're doing an initial compile, > setting the last modified date to '0' for all compiled outputs, then > compiling again. > We can then check the last modified date to see which files were actually >

Re: [gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Adam Murdoch
On 4 Apr 2014, at 12:01 am, Radim Kubacki wrote: > On Thu, Apr 3, 2014 at 12:36 PM, Szczepan Faber > wrote: > Hey, > > How do we avoid sleeps in incremental compilation integ tests? My initial > batch of integ tests for java incremental compilation uses Thread.sleep and > file.lastModified

AW: [gradle-dev] avoiding sleeps in incremental compilation integ tests

2014-04-03 Thread Tim Enderling
Hi, what we did in a similar test: Set the output files read-only after the initial compile. In the positive test case - where you expect recompilation - expect the IOException. Another thought when facing this problem that struck me was: If it is so hard to test something (like that a file has