You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2014/10/14 13:04:48 UTC
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
GitHub user neykov opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/242
Fix OSGi integration tests
Fixes the following items:
* brooklyn.management.osgi.OsgiStandaloneTest
o testDuplicateBundle
o testRemoteDuplicateBundle
Depends on #240
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/neykov/incubator-brooklyn fix/osgi-integration-tests
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/242.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #242
----
commit 8e4878d9330c07839fd8d211c91d698b3037ce43
Author: Aled Sage <al...@gmail.com>
Date: 2014-10-14T10:37:05Z
Update refs to mvn id org.apache.brooklyn
- also changes snapshotUrlGenerator to inspect maven id: if it’s
org.apache then return repository.apache.org; otherwise return
oss.sonatype.org
commit 055d87facbd04bf6aff6593233858a5b73b96e6a
Author: Aled Sage <al...@gmail.com>
Date: 2014-10-14T10:39:20Z
Update pom to include ref to repository.apache.org
- for enabling snapshots from apache
commit 0e994949eec75db249f7b0cf8130f0f9d72d0041
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date: 2014-10-14T11:02:40Z
Fix Integration tests in OsgiStandaloneTest
* setUp/tearDown weren't called when Integration profile specified
* Change testDuplicateBundle back to unit test but ignore if file is not in local repo.
Also change io.brooklyn ref in BrooklynMavenArtifactsTest.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/242#issuecomment-59028594
LGTM. Only a couple of very minor things.
Do you want to rebase this before we commit (now that #240 is merge), or should we just be brave and merge without (it claims it can be merged automatically).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/242#issuecomment-59187936
Merging.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/242#discussion_r18822126
--- Diff: core/src/test/java/brooklyn/management/osgi/OsgiStandaloneTest.java ---
@@ -117,11 +117,15 @@ public void testBootBundle() throws Exception {
Assert.assertEquals(Entity.class, bundleCls.getClassLoader().loadClass(Entity.class.getName()));
}
- // Marked as integration because jenkins configures an unusual local .m2 repository location,
- // so attempts to look up the local artifact fail.
- @Test(groups="Integration")
+ @Test
public void testDuplicateBundle() throws Exception {
- helperDuplicateBundle(MavenRetriever.localUrl(new MavenArtifact("org.apache.brooklyn", "brooklyn-api", "jar", "0.7.0-SNAPSHOT")));
+ MavenArtifact artifact = new MavenArtifact("org.apache.brooklyn", "brooklyn-api", "jar", "0.7.0-SNAPSHOT");
+ String localUrl = MavenRetriever.localUrl(artifact);
+ if ("file".equals(Urls.getProtocol(localUrl))) {
+ helperDuplicateBundle(localUrl);
+ } else {
+ log.warn("Skipping test OsgiStandaloneTest.testDuplicateBundle due to " + artifact + " not available in local repo.");
--- End diff --
nice! should we have an integration test that does the same, but doesn't skip? or does that not make sense?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-brooklyn/pull/242
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/242#discussion_r18822216
--- Diff: core/src/test/java/brooklyn/management/osgi/OsgiStandaloneTest.java ---
@@ -117,11 +117,15 @@ public void testBootBundle() throws Exception {
Assert.assertEquals(Entity.class, bundleCls.getClassLoader().loadClass(Entity.class.getName()));
}
- // Marked as integration because jenkins configures an unusual local .m2 repository location,
- // so attempts to look up the local artifact fail.
- @Test(groups="Integration")
+ @Test
public void testDuplicateBundle() throws Exception {
- helperDuplicateBundle(MavenRetriever.localUrl(new MavenArtifact("org.apache.brooklyn", "brooklyn-api", "jar", "0.7.0-SNAPSHOT")));
+ MavenArtifact artifact = new MavenArtifact("org.apache.brooklyn", "brooklyn-api", "jar", "0.7.0-SNAPSHOT");
+ String localUrl = MavenRetriever.localUrl(artifact);
+ if ("file".equals(Urls.getProtocol(localUrl))) {
+ helperDuplicateBundle(localUrl);
+ } else {
+ log.warn("Skipping test OsgiStandaloneTest.testDuplicateBundle due to " + artifact + " not available in local repo.");
--- End diff --
testRemoteDuplicateBundle already tests this scenario, no point in testing with remote URL.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/242#issuecomment-59029066
Rebased and added // BROOKLYN_VERSION
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-brooklyn pull request: Fix OSGi integration tests
Posted by richardcloudsoft <gi...@git.apache.org>.
Github user richardcloudsoft commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/242#issuecomment-59026812
@neykov, #240 has been merged, if you want to rebase this PR against master.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---