Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2013-04-07 10:06:19 -0400
committerIgor Fedorenko2013-04-09 23:04:06 -0400
commit2e010624ac0a8ab9d21afaea0e518a3d791f3e15 (patch)
tree2ae2dc55a5af9d22f7773be1c208eb85c4c84429
parente785c92f39db302625921db7476aefaa1073fbaf (diff)
downloadm2e-core-2e010624ac0a8ab9d21afaea0e518a3d791f3e15.tar.gz
m2e-core-2e010624ac0a8ab9d21afaea0e518a3d791f3e15.tar.xz
m2e-core-2e010624ac0a8ab9d21afaea0e518a3d791f3e15.zip
Fixed FilexWagon instantiation strategy
FilexWagon was marked as singleton and was retaining state from one test invocation to the next, which resulted in unexpected/unwanted crosstalk among tests. Changed FilexWagon instantiation policy to per-lookup and cleanup any static state as part of test setUp. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java b/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java
index dd92108e..d7d66e49 100644
--- a/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java
+++ b/org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java
@@ -139,6 +139,8 @@ public abstract class AbstractMavenProjectTestCase extends TestCase {
LifecycleMappingFactory.setDefaultLifecycleMappingMetadataSource(null);
WorkspaceHelpers.cleanWorkspace();
+ FilexWagon.setRequestFailPattern(null);
+ FilexWagon.setRequestFilterPattern(null, true);
}
protected void tearDown() throws Exception {
@@ -470,7 +472,7 @@ public abstract class AbstractMavenProjectTestCase extends TestCase {
descriptor.setRoleClass(Wagon.class);
descriptor.setImplementationClass(FilexWagon.class);
descriptor.setRoleHint("filex");
- descriptor.setInstantiationStrategy("singleton");
+ descriptor.setInstantiationStrategy("per-lookup");
container.addComponentDescriptor(descriptor);
}
}

Back to the top