Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327137

Summary: Some tests are setup differently when run as a suite and when run individually
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: TextAssignee: Deepak Azad <deepakazad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
fix none

Description Deepak Azad CLA 2010-10-06 12:43:38 EDT
I came across a few such instances in o.e.jdt.text.tests.performance. This is incorrect and the code is confusing...

	public static Test suite() {
		return new PerfTestSuite(FileBufferPerformanceTest.class);
	}

	public static Test setUpTest(Test test) {
		return new PerformanceTestSetup(test);
	}

The correct way could be

	public static Test suite() {
		return new PerformanceTestSetup(new PerfTestSuite(FileBufferPerformanceTest.class));
	}

	public static Test setUpTest(Test test) {
		return new PerformanceTestSetup(test);
	}
OR
        public static Test suite() {
		return new PerfTestSuite(FileBufferPerformanceTest.class);
	}

	public static Test setUpTest(Test test) {
		return new TestSetup(test);
	}
Comment 1 Dani Megert CLA 2010-10-07 12:11:47 EDT
I've remove

    public static Test setUpTest(Test test) {
        return new TestSetup(test);
    }

in HEAD.

Deepak, please check the other cases you've found.
Comment 2 Deepak Azad CLA 2010-10-12 02:46:35 EDT
Created attachment 180638 [details]
fix

Fixed in HEAD
Comment 3 Deepak Azad CLA 2010-10-12 02:53:13 EDT
.