Skip to content

Commit

Permalink
fix(plc4go/eip): Tried to make the code more robust to no longer caus…
Browse files Browse the repository at this point in the history
…e errors on Jenkins
  • Loading branch information
chrisdutz committed Mar 8, 2023
1 parent e0c43d9 commit f283dc2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
16 changes: 16 additions & 0 deletions plc4go/protocols/bacnetip/readwrite/model/BACnetVendorId.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion plc4go/spi/testutils/DriverTestRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (m DriverTestsuite) Run(driverManager plc4go.PlcDriverManager, testcase Tes
return errors.Wrap(err, "error in setup step "+testStep.name)
}
// We sleep a bit to not run too fast into the post setup steps and give connections a bit time to settle built up
time.Sleep(2 * time.Millisecond)
time.Sleep(10 * time.Millisecond)
}

// Run the actual scenario steps
Expand All @@ -126,6 +126,7 @@ func (m DriverTestsuite) Run(driverManager plc4go.PlcDriverManager, testcase Tes
if err != nil {
return errors.Wrap(err, "error in step "+testStep.name)
}
time.Sleep(10 * time.Millisecond)
}

// Run the teardown steps
Expand All @@ -135,6 +136,7 @@ func (m DriverTestsuite) Run(driverManager plc4go.PlcDriverManager, testcase Tes
if err != nil {
return errors.Wrap(err, "error in teardown step "+testStep.name)
}
time.Sleep(10 * time.Millisecond)
}

log.Info().Msgf("\n-------------------------------------------------------\nDone\n-------------------------------------------------------\n")
Expand Down
8 changes: 2 additions & 6 deletions plc4go/tests/drivers/tests/eip_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,21 @@
package tests

import (
"os"
"testing"

"github.com/apache/plc4x/plc4go/internal/eip"
"github.com/apache/plc4x/plc4go/pkg/api/config"
"github.com/apache/plc4x/plc4go/protocols/eip/readwrite"
"github.com/apache/plc4x/plc4go/spi/testutils"
_ "github.com/apache/plc4x/plc4go/tests/initializetest"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)

func TestEIPDriver(t *testing.T) {
log.Logger = log.
/*log.Logger = log.
With().Caller().Logger().
Output(zerolog.ConsoleWriter{Out: os.Stderr}).
Level(zerolog.DebugLevel)
config.TraceTransactionManagerWorkers = true
config.TraceTransactionManagerTransactions = true
config.TraceDefaultMessageCodecWorker = true
config.TraceDefaultMessageCodecWorker = true*/
testutils.RunDriverTestsuite(t, eip.NewDriver(), "assets/testing/protocols/eip/DriverTestsuite.xml", readwrite.EipXmlParserHelper{})
}

0 comments on commit f283dc2

Please sign in to comment.