vazexqi / CodingSpectator

Watches and analyzes code edits in the Eclipse IDE non-invasively
http://codingspectator.cs.illinois.edu
Other
20 stars 14 forks source link

Some of the refactoring tests in JDT throw exceptions #164

Closed reprogrammer closed 13 years ago

reprogrammer commented 13 years ago

I ran the tests in "org.eclipse.jdt.ui.tests.refactoring.AllRefactoringTests". All the test pass. But, the following tests throw an exception into the console even though they all pass.

  1. org.eclipse.jdt.ui.tests.refactoring.RenameTypeTests.testFail4()
  2. org.eclipse.jdt.ui.tests.refactoring.RenameTypeTests.testFail5()
  3. org.eclipse.jdt.ui.tests.refactoring.RenameTypeTests.testFail6()
  4. org.eclipse.jdt.ui.tests.refactoring.RenameTypeTests.testFail8()
  5. org.eclipse.jdt.ui.tests.refactoring.RenameTypeTests.testFail22()

For instance, "testFail4" outputs the following in the output.

junit.framework.ComparisonFailure: null expected:<...258777/src/p/A.java-[CHANG]ED-
  L/TestProject1...> but was:<...258777/src/p/A.java-[REMOV]ED-
  L/TestProject1...>
    at junit.framework.Assert.assertEquals(Assert.java:81)
    at junit.framework.Assert.assertEquals(Assert.java:87)
    at org.eclipse.jdt.ui.tests.refactoring.TestModelProvider.assertTrue(TestModelProvider.java:98)
    at org.eclipse.jdt.ui.tests.refactoring.TestModelProvider.assertTrue(TestModelProvider.java:96)
    at org.eclipse.jdt.ui.tests.refactoring.TestModelProvider.assertTrue(TestModelProvider.java:96)
    at org.eclipse.jdt.ui.tests.refactoring.TestModelProvider.assertTrue(TestModelProvider.java:96)
    at org.eclipse.jdt.ui.tests.refactoring.TestModelProvider.assertTrue(TestModelProvider.java:60)
    at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest$1.resourceChanged(RefactoringTest.java:317)
    at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
    at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:327)
    at org.eclipse.core.internal.resources.Workspace.checkpoint(Workspace.java:381)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:263)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:218)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
    at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.executePerformOperation(RefactoringTest.java:359)
    at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.performRefactoring(RefactoringTest.java:327)
    at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.performRefactoring(RefactoringTest.java:233)
    at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.performRefactoring(RefactoringTest.java:228)
    at org.eclipse.jdt.ui.tests.refactoring.RenameTypeTests.testFail4(RenameTypeTests.java:325)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.extensions.TestSetup.run(TestSetup.java:27)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
    at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:116)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.pde.internal.junit.runtime.UITestApplication.start(UITestApplication.java:47)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
reprogrammer commented 13 years ago

Note that I get the above exceptions in both Helios SR1 and SR2.

reprogrammer commented 13 years ago

Fixed the failing tests in 7b34d4dd10efee30a09acc5b02a0892c59e8768e.