I created a new pull request with some improvements: https://github.com/gradle/gradle/pull/259. I will be adding to it as I go. Fell free to pull it when you see fit.
The next step will be to modify SFTPServer to set expectations and inject failures. On Sun, Mar 23, 2014 at 11:25 PM, Adam Murdoch <adam.murd...@gradleware.com>wrote: > > On 22 Mar 2014, at 5:52 am, Marcin Erdmann <marcin.erdm...@proxerd.pl> > wrote: > > On Wed, Mar 19, 2014 at 10:55 PM, Adam Murdoch < > adam.murd...@gradleware.com> wrote: > >> >> Your changes look really good to me. I added some comments on the commit, >> but I think they are all things we can address in later commits. I'd say >> let's merge this and go from there. >> > > I created a pull request (https://github.com/gradle/gradle/pull/256) and > will address your comments. > > > Great, thank you. > > > > >> >> >> Some notes: >> - As suggested I didn't implement a test for publishing to a repo with >> multiple artifact/ivy patterns. >> - I decided not to implement a test for generic error handling when >> "server throws an exception" - I couldn't come up with a way to simulate >> such situation using current SFTPServer fixture >> >> >> It becomes important for caching, as we want to remember 'not found' >> differently to 'it blew up'. >> >> I suspect you can get an internal failure by throwing an exception out of >> the VirtualFileSystemView. >> > > Ok, I will change SFTPServer to use a VirtualFileSystemView from a field > so that a different instance can be provided on a per test basis. > > > I'd expect we'd end up with something like the HttpServer fixture, which > allows the test to set certain expectations about what requests will be > made, and also allows the test to inject failures. > > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com > > Join us for Gradle Summit 2014, June 12th and 13th in Santa Clara, CA: > http://www.gradlesummit.com > >