PragmaticFlow / NBomber.Sinks.InfluxDB

A NBomber sink that writes statistics to InfluxDB
Apache License 2.0
7 stars 9 forks source link

InfluxDBSink has breaking change dependency on with RestSharp Version>= "107.3.0" #10

Open cvizzini opened 2 years ago

cvizzini commented 2 years ago

When implementing InfluxDB reporting as well as having RestSharp version > 106.12.0 with throw the following error:

System.MissingMethodException: 'Method not found: 'Void RestSharp.RestClient.set_UserAgent(System.String)'.'

var influxDbConfig = InfluxDbSinkConfig.Create(
    url: "http://localhost:8086", database: "API_Test",
    userName: "Admin", password: "password"
);

//create InfluxDB reporting sink
using var influxDb = new InfluxDBSink(influxDbConfig);

NBomberRunner
    .RegisterScenarios(scenariosToRun)
    .WithWorkerPlugins(pingPlugin)
    .WithReportingSinks(influxDb)
    .WithTestName(" API Test")
    .WithTestSuite(" API Test Suite")
    .Run();

This is due to the InfluxDB.Client required by InfluxDB Sink to be 3.1.0 which locks the RestSharp Version to 106.12.0. However the latest 4.0.0 supports RestSharp Version>= "107.3.0"

Please update to version InfluxDB.Client 4.0.0