Skip to content

Commit

Permalink
refactor(test): hide/remove exposed external types
Browse files Browse the repository at this point in the history
Hides or removes exposed external types such as Broker,
SpringBrokerBridge, etc. These types come from modules which offer no
backwards compatibility guarantees, and for which we don't want to do
so. Including them here in a support API risks the chance of users using
these types and having problems during updates.

(cherry picked from commit 805cd2d)
  • Loading branch information
npepinpe committed Jun 4, 2021
1 parent f3ea3f4 commit 1399419
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 11 deletions.
57 changes: 57 additions & 0 deletions test/ignored-changes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"extension": "revapi.differences",
"configuration": {
"justification": "Hide or remove previously exposed types which come from external modules which offer no backwards compatibility guarantees",
"ignore": true,
"differences": [
{
"code": "java.field.visibilityReduced",
"old": "field io.camunda.zeebe.test.EmbeddedBrokerRule.broker",
"new": "field io.camunda.zeebe.test.EmbeddedBrokerRule.broker",
"oldVisibility": "protected",
"newVisibility": "private"
},
{
"code": "java.field.visibilityReduced",
"old": "field io.camunda.zeebe.test.EmbeddedBrokerRule.brokerCfg",
"new": "field io.camunda.zeebe.test.EmbeddedBrokerRule.brokerCfg",
"oldVisibility": "protected",
"newVisibility": "private"
},
{
"code": "java.field.visibilityReduced",
"old": "field io.camunda.zeebe.test.EmbeddedBrokerRule.configurators",
"new": "field io.camunda.zeebe.test.EmbeddedBrokerRule.configurators",
"oldVisibility": "protected",
"newVisibility": "private"
},
{
"code": "java.field.visibilityReduced",
"old": "field io.camunda.zeebe.test.EmbeddedBrokerRule.controlledActorClock",
"new": "field io.camunda.zeebe.test.EmbeddedBrokerRule.controlledActorClock",
"oldVisibility": "protected",
"newVisibility": "private"
},
{
"code": "java.field.visibilityReduced",
"old": "field io.camunda.zeebe.test.EmbeddedBrokerRule.recordingExporterTestWatcher",
"new": "field io.camunda.zeebe.test.EmbeddedBrokerRule.recordingExporterTestWatcher",
"oldVisibility": "protected",
"newVisibility": "private"
},
{
"code": "java.field.visibilityReduced",
"old": "field io.camunda.zeebe.test.EmbeddedBrokerRule.springBrokerBridge",
"new": "field io.camunda.zeebe.test.EmbeddedBrokerRule.springBrokerBridge",
"oldVisibility": "protected",
"newVisibility": "private"
},
{
"code": "java.method.removed",
"old": "method io.camunda.zeebe.broker.Broker io.camunda.zeebe.test.EmbeddedBrokerRule::getBroker()"
}
]
}
}
]
18 changes: 7 additions & 11 deletions test/src/main/java/io/camunda/zeebe/test/EmbeddedBrokerRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ public class EmbeddedBrokerRule extends ExternalResource {
protected static final Logger LOG = LoggerFactory.getLogger("io.camunda.zeebe.test");
private static final String SNAPSHOTS_DIRECTORY = "snapshots";
private static final String STATE_DIRECTORY = "state";
protected final RecordingExporterTestWatcher recordingExporterTestWatcher =
new RecordingExporterTestWatcher();
protected final Supplier<InputStream> configSupplier;
protected final Consumer<BrokerCfg>[] configurators;
protected BrokerCfg brokerCfg;
protected Broker broker;
protected final ControlledActorClock controlledActorClock = new ControlledActorClock();
protected final SpringBrokerBridge springBrokerBridge = new SpringBrokerBridge();
protected long startTime;
private final Consumer<BrokerCfg>[] configurators;
private final RecordingExporterTestWatcher recordingExporterTestWatcher =
new RecordingExporterTestWatcher();
private final BrokerCfg brokerCfg;
private Broker broker;
private final ControlledActorClock controlledActorClock = new ControlledActorClock();
private final SpringBrokerBridge springBrokerBridge = new SpringBrokerBridge();
private final Duration timeout;
private final File newTemporaryFolder;
private String dataDirectory;
Expand Down Expand Up @@ -184,10 +184,6 @@ public InetSocketAddress getGatewayAddress() {
return brokerCfg.getGateway().getNetwork().toSocketAddress();
}

public Broker getBroker() {
return broker;
}

public ControlledActorClock getClock() {
return controlledActorClock;
}
Expand Down

0 comments on commit 1399419

Please sign in to comment.