Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] Test failures

> With the system property removed, the test passes.  I assume that you
> are using this launch configuration.  So, let me know if changing it
> will make the test pass for you.

After removing the system property all tests passed!


> The correct thing to do here is to force the system property to be off
> only for that test.

I attached a patch that should do that. At least it seems to be
working for me locally.
### Eclipse Workspace Patch 1.0
#P org.eclipse.ajdt.core.tests
Index: src/org/eclipse/ajdt/core/tests/model/AJModelTest4.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ajdt/AJDT_src/org.eclipse.ajdt.core.tests/src/org/eclipse/ajdt/core/tests/model/AJModelTest4.java,v
retrieving revision 1.13
diff -u -r1.13 AJModelTest4.java
--- src/org/eclipse/ajdt/core/tests/model/AJModelTest4.java	1 Nov 2010 21:29:28 -0000	1.13
+++ src/org/eclipse/ajdt/core/tests/model/AJModelTest4.java	14 Dec 2010 21:02:06 -0000
@@ -21,9 +21,27 @@
  *
  */
 public class AJModelTest4 extends AbstractModelTest {
+	
+	private static final String MINIMAL_MODEL_KEY = "aspectj.minimalModel";
+	private String oldMinimalModelProperty;
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		oldMinimalModelProperty = System.getProperty(MINIMAL_MODEL_KEY);
+		System.clearProperty(MINIMAL_MODEL_KEY);
+	}
 
     public void testAJHandleIdentifiers() throws Exception {
         IProject project = createPredefinedProject("Handle Testing"); //$NON-NLS-1$
         checkHandles(JavaCore.create(project));
     }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	if(oldMinimalModelProperty != null ){
+	    	System.setProperty(MINIMAL_MODEL_KEY, oldMinimalModelProperty);
+    	}
+    	super.tearDown();
+    }
 }

Back to the top