Bug 543394 - [test] ModuleBuilderTests.test005 fails unless preceded by test004
Summary: [test] ModuleBuilderTests.test005 fails unless preceded by test004
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.10   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-12 19:08 EST by Stephan Herrmann CLA
Modified: 2023-02-20 16:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2019-01-12 19:08:13 EST
test005 depends on some side-effect of test004, running the former without the latter fails.

It also fails if I add the following to the (empty) finally block in test004:
	deleteProject(this.currentProject);
	setUpSuite();

Symptom is:
	"The package com.greetings does not exist or is empty"
instead of the expected:
	"The type Connection from module java.sql may not be accessible to clients due to missing \'requires transitive\'"

Apparently, test005 needs the same Main.java as created by test004.

While that's easy to fix, shouldn't we generally avoid such side-effects like modifying resources created only once in setupSuite()??
Comment 1 Stephan Herrmann CLA 2019-01-22 11:40:28 EST
@Jay, it seem you introduced this style via bug 487832. 

Could you please comment, which advantage you saw in creating and modifying these empty files? Do you mind emptying ModuleBuilderTests.setUpSuite() and pushing necessary bits into a helper method to be invoked by those individual tests that need it? Then all editFile() would be changed to createFile() and P1 be deleted after each test (perhaps even in tearDown())?
Comment 2 Eclipse Genie CLA 2021-01-12 04:04:58 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2023-02-20 16:14:55 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.