Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SharedTestLifeCycle to simplify plugin integration tests #8965

Closed
emeroad opened this issue Jun 23, 2022 · 0 comments · Fixed by #8966, #8969, #8981, #8996 or #8997
Closed

Add SharedTestLifeCycle to simplify plugin integration tests #8965

emeroad opened this issue Jun 23, 2022 · 0 comments · Fixed by #8966, #8969, #8981, #8996 or #8997
Milestone

Comments

@emeroad
Copy link
Member

emeroad commented Jun 23, 2022

The class visibility of @BeforeSharedClass mechanism is very confusing.
To simplify this, we introduce @SharedTestLifeCycle.

This feature is not confused because the class is isolated separately, and value sharing between classloaders uses Properties.

@SharedTestLifeCycleClass(DatabaseServer.class)
public class PluginTestIt {
    @SharedTestBeforeAllResult
    public static void setBeforeAllResult(Properties beforeAllResult) {
         String jdbcUrl = beforeAllResult.getProperteis("JDBC_URL");
    }
}
public class DatabaseServer implements SharedTestLifeCycle {
    @Override
    public Properties beforeAll() {
         database.start();
         Properties beforeAllResult = new Properties();
         beforeAllResult.setProperteis("JDBC_URL", database.getJdbcUrl());
         return beforeAllResult
    }

    @Override
    public void afterAll() {

    }
}
@emeroad emeroad added this to the 2.5.0 milestone Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 23, 2022
@emeroad emeroad reopened this Jun 23, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 24, 2022
emeroad added a commit that referenced this issue Jun 24, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 28, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 28, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 28, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 28, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 28, 2022
emeroad added a commit that referenced this issue Jun 28, 2022
emeroad added a commit that referenced this issue Jun 28, 2022
emeroad added a commit to emeroad/pinpoint that referenced this issue Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment