Skip to content

Commit 182ed19

Browse files
committed
fix: Implemented something to gracefully detect if PCAP libs are not available and to skip the tests related to that.
1 parent e095044 commit 182ed19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

plc4j/transports/raw-socket/src/test/java/org/apache/plc4x/java/transport/rawsocket/RawSocketTransportTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ void testCreateTransportInstance_promiscuousMode() throws Exception {
236236

237237
@Test
238238
void testCreateTransportInstance_invalidInterface() {
239+
// Constructing the instance reaches pcap's native layer, so skip when it's unavailable.
240+
PcapTestSupport.findAllDevsOrSkip();
241+
239242
RawSocketTransportConfiguration config = new RawSocketTransportConfiguration();
240243
config.interfaceName = "INVALID_INTERFACE_THAT_DOES_NOT_EXIST";
241244
config.remoteAddress = "00:00:00:00:00:01";

0 commit comments

Comments
 (0)