You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Zack Shoylev <no...@github.com> on 2013/10/04 21:38:28 UTC
[jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
https://issues.apache.org/jira/browse/JCLOUDS-332
You can merge this Pull Request by running:
git pull https://github.com/rackspace/jclouds skip-windows-tests
Or you can view, comment on it, or merge it online at:
https://github.com/jclouds/jclouds/pull/168
-- Commit Summary --
* JCLOUDS-332 Skips tests broken on windows
-- File Changes --
M apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java (77)
M blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java (5)
-- Patch Links --
https://github.com/jclouds/jclouds/pull/168.patch
https://github.com/jclouds/jclouds/pull/168.diff
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #281](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/281/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25854278
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Phillips <no...@github.com>.
For the "skip if Windows" logic, use the same [data provider](https://github.com/jclouds/jclouds/blob/master/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmApiTest.java#L315) pattern as for the [`VmApiTest`](https://github.com/jclouds/jclouds/blob/master/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmApiTest.java#L66):
```
@Test(dataProvider = "ignoreOnWindows", description = "...")
```
? This seems less intrusive in the test itself...
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25737799
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #739](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/739/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25735623
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Zack Shoylev <no...@github.com>.
> @@ -454,7 +454,10 @@ public void blobNotFound() throws InterruptedException {
>
> @DataProvider(name = "delete")
> public Object[][] createData() {
> - return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
> + if(System.getProperty("os.name").contains("indows"))
> + return new Object[][] { { "normal" } };
> + else
> + return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
For this set of failures I have stacktraces on the JIRA.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6813095
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Gaul <no...@github.com>.
+1, good to commit for master and 1.6.x.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25856406
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #743](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/743/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25854294
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Phillips <no...@github.com>.
> @@ -218,4 +218,11 @@ public static void createResources() throws IOException {
> Files.copy(ByteStreams.newInputStreamSupplier(buffer), file);
> }
> }
> +
> + public static final Object[][] NO_INVOCATIONS = new Object[0][0];
> + public static final Object[][] SINGLE_NO_ARG_INVOCATION = { new Object[0] };
Put these at the top of the file?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6836711
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Matt Stephenson <no...@github.com>.
> @@ -454,7 +454,10 @@ public void blobNotFound() throws InterruptedException {
>
> @DataProvider(name = "delete")
> public Object[][] createData() {
> - return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
> + if(System.getProperty("os.name").contains("indows"))
> + return new Object[][] { { "normal" } };
> + else
> + return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
Style is off here too, and why "indows" instead of .toLower().contains("windows")?
This seems sloppy.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6781812
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #277](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/277/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25736672
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Phillips <no...@github.com>.
> +1, good to commit for master and 1.6.x.
Wait, wait...I don't see the actual `ignoreOnWindows` _method_ in the test class? `dataProvider` references a _method name_, according to [the documentation](http://testng.org/javadoc/org/testng/annotations/DataProvider.html).
See [`VmApi`](https://github.com/jclouds/jclouds/blob/master/apis/vcloud/src/test/java/org/jclouds/vcloud/features/VmApiTest.java#L314)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25871370
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Phillips <no...@github.com>.
> @@ -454,7 +454,10 @@ public void blobNotFound() throws InterruptedException {
>
> @DataProvider(name = "delete")
> public Object[][] createData() {
> - return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
> + if(System.getProperty("os.name").contains("indows"))
> + return new Object[][] { { "normal" } };
> + else
> + return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
How does this break on Windows, and is this something that should really be fixed instead?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6781753
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Gaul <no...@github.com>.
>
> + @Test(dataProvider = "ignoreOnWindows", groups = { "integration", "live" })
Can we apply the dataProvider at the class level?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6814491
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Zack Shoylev <no...@github.com>.
I really like the data provider approach, I will test it and modify as needed. Thanks!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25843994
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #738](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/738/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25726015
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #276](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/276/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25726010
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Gaul <no...@github.com>.
> @@ -95,4 +100,76 @@ public void testDirectory() throws InterruptedException {
> public void testWithDetails() throws InterruptedException, IOException {
> throw new SkipException("not yet implemented");
> }
> +
> + @Override
> + public void containerExists() throws InterruptedException {
> + if(System.getProperty("os.name").contains("indows"))
> + throw new SkipException("not yet implemented");
> + else
Could you call a helper method:
```
private static void skipIfWindows() {
}
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6777672
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #753](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/753/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25924483
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #288](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/288/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25912530
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Phillips <no...@github.com>.
See [master](https://git-wip-us.apache.org/repos/asf?p=incubator-jclouds.git;a=commit;h=75939353800ad8e1f18646428ab40be32a9f4f16). Thanks, Zack!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25925984
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Zack Shoylev <no...@github.com>.
> @@ -72,7 +75,8 @@ public void testNotWithDetails() throws InterruptedException {
> PageSet<? extends StorageMetadata> container = view.getBlobStore().list(containerName, maxResults(1));
>
> BlobMetadata metadata = (BlobMetadata) Iterables.getOnlyElement(container);
> - // transient container should be lenient and not return metadata on undetailed listing.
> + // transient container should be lenient and not return metadata on
> + // undetailed listing.
Reformatted everything is why
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6829945
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Gaul <no...@github.com>.
> @@ -72,7 +75,8 @@ public void testNotWithDetails() throws InterruptedException {
> PageSet<? extends StorageMetadata> container = view.getBlobStore().list(containerName, maxResults(1));
>
> BlobMetadata metadata = (BlobMetadata) Iterables.getOnlyElement(container);
> - // transient container should be lenient and not return metadata on undetailed listing.
> + // transient container should be lenient and not return metadata on
> + // undetailed listing.
Spurious changes.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6814470
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Gaul <no...@github.com>.
> @@ -454,8 +454,12 @@ public void blobNotFound() throws InterruptedException {
>
> @DataProvider(name = "delete")
> public Object[][] createData() {
> - return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
> + if(System.getProperty("os.name").toLowerCase().contains("windows")) {
> + return new Object[][] { { "normal" } };
Does "sp ace" work on Windows?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6814464
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Phillips <no...@github.com>.
>
> + @Test(dataProvider = "ignoreOnWindows", groups = { "integration", "live" })
I fear [not](http://testng.org/javadoc/org/testng/annotations/DataProvider.html) :-(
"The @Test method that wants to receive data from this DataProvider needs to use a dataProvider name equals to the name of this annotation"
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6819088
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #291](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/291/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25924492
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Andrew Gaul <no...@github.com>.
> @@ -454,8 +454,12 @@ public void blobNotFound() throws InterruptedException {
>
> @DataProvider(name = "delete")
> public Object[][] createData() {
> - return new Object[][] { { "normal" }, { "sp ace" }, { "qu?stion" }, { "unic₪de" }, { "path/foo" }, { "colon:" },
> + if(System.getProperty("os.name").toLowerCase().contains("windows")) {
Add space between if and (.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6814460
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Zack Shoylev <no...@github.com>.
@demobox Good catch. What I did is that I added the TestUtils data provider from the VmApi to the TestUtils class in here.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25913236
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by Zack Shoylev <no...@github.com>.
> @@ -95,4 +100,76 @@ public void testDirectory() throws InterruptedException {
> public void testWithDetails() throws InterruptedException, IOException {
> throw new SkipException("not yet implemented");
> }
> +
> + @Override
> + public void containerExists() throws InterruptedException {
> + if(System.getProperty("os.name").contains("indows"))
> + throw new SkipException("not yet implemented");
> + else
Sure I can dry it up a bit.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168/files#r6777722
Re: [jclouds] JCLOUDS-332 Skips tests broken on windows (#168)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #750](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/750/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/168#issuecomment-25912589