Correctly set topic permissions for sparkplug B prefix, and use correct topics in test
This commit is contained in:
parent
d0c0ec33ff
commit
061651f31e
|
|
@ -93,8 +93,8 @@ init_per_testcase(Testcase, Config) ->
|
|||
{ok, _} = rabbit_ct_broker_helpers:rabbitmqctl(Config, 0, ["set_permissions", "-p", "/", User, ".*", ".*", ".*"]),
|
||||
{ok, _} = rabbit_ct_broker_helpers:rabbitmqctl(Config, 0,
|
||||
["set_topic_permissions", "-p", "/", "guest", "amq.topic",
|
||||
"test-topic|test-retained-topic|.*mid.*|.*topic.*|{username}.{client_id}.a",
|
||||
"test-topic|test-retained-topic|.*mid.*|.*topic.*|last-will|{username}.{client_id}.a"]),
|
||||
"test-topic|test-retained-topic|.*mid.*|.*topic.*|{username}.{client_id}.a|^sp[AB]v\\d+___\\d+",
|
||||
"test-topic|test-retained-topic|.*mid.*|.*topic.*|last-will|{username}.{client_id}.a|^sp[AB]v\\d+___\\d+"]),
|
||||
rabbit_ct_helpers:testcase_started(Config, Testcase).
|
||||
|
||||
end_per_testcase(Testcase, Config) ->
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ public class MqttTest implements MqttCallback {
|
|||
private final byte[] payload = "payload".getBytes();
|
||||
private final String topic = "test-topic";
|
||||
private final String retainedTopic = "test-retained-topic";
|
||||
private final String sparkplugBTopicPrefix = "spBv1.0";
|
||||
private int testDelay = 2000;
|
||||
private Duration timeout = Duration.TEN_SECONDS;
|
||||
|
||||
|
|
@ -433,8 +432,8 @@ public class MqttTest implements MqttCallback {
|
|||
}
|
||||
|
||||
@Test public void sparkplug_b_topics() throws MqttException, IOException, InterruptedException, TimeoutException {
|
||||
final String amqp_091_topic = sparkplugBTopicPrefix + ".MACLab.DDATA.Opto22.CLX";
|
||||
final String sparkplug_b_topic = sparkplugBTopicPrefix + "/MACLab/+/Opto22/CLX";
|
||||
final String amqp_091_topic = "spBv1___0.MACLab.DDATA.Opto22.CLX";
|
||||
final String sparkplug_b_topic = "spBv1.0/MACLab/+/Opto22/CLX";
|
||||
|
||||
client.connect(conOpt);
|
||||
client.setCallback(this);
|
||||
|
|
|
|||
Loading…
Reference in New Issue