eclipse-sparkplug / sparkplug

Sparkplug
Eclipse Public License 2.0
109 stars 39 forks source link

The Sparkplug Aware Server Test won't work for a broker other than HiveMQ #478

Open icraggs-sparkplug opened 1 year ago

icraggs-sparkplug commented 1 year ago

What happened?

The Sparkplug Aware Server Test is confusing the HiveMQ test controller and the MQTT broker under test, so that the test is actually mainly running against the HiveMQ broker.

What is the product or software this issue was discovered with?

Eclipse Mosquitto

What exact steps need to be performed to reproduce the problem?

Follow the instructions to start and run the Sparkplug Aware Server Test

Is this related to a Sparkplug Listing request? If so, link the issue from https://github.com/eclipse-sparkplug/sparkplug.listings here.

No response

Version

3.0.0 (Default)

Accept EFTL Terms

icraggs-sparkplug commented 1 year ago

If anyone has used the test successfully, I'm interested to hear how.

ralight commented 10 months ago

@icraggs-sparkplug I've taken another look at this using the SNAPSHOT build from https://download.eclipse.org/sparkplug/snapshot/

It still doesn't seem as though the sparkplug aware does anything. The actions of the AwareTestSubscriber are to just CONNECT, nothing more. Does the snapshot build include the new changes?

1698529708: New connection from 127.0.0.1:36908 on port 1884.
1698529708: New client connected from 127.0.0.1:36908 as AwareTestSubscriber (p4, c1, k60).
1698529708: No will message specified.
1698529708: Sending CONNACK to AwareTestSubscriber (0, 0)
icraggs-sparkplug commented 10 months ago

Ok, I wasn't aware of the availability of the snapshot build - I'll try it out.

In any case, the test will start, and then you're expected to start an edge node with the specified group and edge ids as in step 5 on the instructions:

 5. Connect an Edge Node to trigger a birth message for the Edge and its Devices.

Is that what you did?

ralight commented 10 months ago

Yes. The rough set of events on the broker were:

TCK->broker CONNECT
broker->TCK CONNACK
test client->broker CONNECT
broker->test client CONNACK
test client->broker PUBLISH (NBIRTH)
test client->broker PUBLISH (DBIRTH)

I don't understand how the TCK client can monitor anything, given that it doesn't subscribe.

icraggs-sparkplug commented 10 months ago

It's supposed to. I'll try it out.

icraggs-sparkplug commented 10 months ago

Ok, it works if I use the 3.x branch directly. Confusingly, the develop branch, which is targeted at 4.0 is being used to build that download. I'll see if I can get that fixed.

icraggs-sparkplug commented 10 months ago

The develop branch is now building as 4.0.0-SNAPSHOT. I'll see if I can get the 3.x branch building as 3.0.1-SNAPSHOT.

icraggs-sparkplug commented 9 months ago

@ralight So the 3.0.0 package at https://www.eclipse.org/downloads/download.php?file=/sparkplug/3.0.0/Eclipse-Sparkplug-TCK-3.0.0.zip currently has the fix in, and worked for me.

The packages aren't right yet - this fix should be in the 3.0.1-SNAPSHOT build, but it's there to try out if you want. When all the builds are working properly. the 3.0.0 build will be back to the original, and the 3.0.1 package will contain the fixes, including this one,

ralight commented 9 months ago

Thanks Ian, that works a lot better. I can now pass the broker tests. The documentation suggests that I need to create a summary report using the "Create" button on the results tab. There isn't a create button for me. Do I need to pass every test including the host and edge node tests to get that button to appear?

icraggs-sparkplug commented 6 months ago

@ralight the proper build package https://www.eclipse.org/downloads/download.php?file=/sparkplug/snapshot/Eclipse-Sparkplug-TCK-3.0.1-SNAPSHOT.zip now contains this updated test.

I'll look into your other questions - the answer is, I'm sure, no, you don't need to pass every test to get a report.