Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327137 - Some tests are setup differently when run as a suite and when run individually
Summary: Some tests are setup differently when run as a suite and when run individually
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 12:43 EDT by Deepak Azad CLA
Modified: 2010-10-12 02:53 EDT (History)
1 user (show)

See Also:


Attachments
fix (11.38 KB, text/plain)
2010-10-12 02:46 EDT, Deepak Azad CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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
.