OPNFLWPLUG-981: per-capability configuration for stats polling 50/68650/5
authorEvan Zeller <evanrzeller@gmail.com>
Sat, 24 Feb 2018 00:05:34 +0000 (16:05 -0800)
committerEvan Zeller <evanrzeller@gmail.com>
Sat, 10 Mar 2018 00:59:38 +0000 (16:59 -0800)
Implemented granular config knobs to enable or disable statistics
polling for each of the OpenFlow capabilities. Only if supported by
device and enabled by this configuration will the plugin poll the
statistics. By default all are enabled.

Change-Id: Ic0bc81f1f2efc51f96dc6ccd94e803b70ad14174
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/configuration/ConfigurationProperty.java
openflowplugin-api/src/main/yang/openflow-provider-config.yang
openflowplugin-blueprint-config/src/main/resources/initial/openflowplugin.cfg
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplTest.java

index 26d680e6d51c672d466f38ffe55f9b079d95857c..79d4e7c8b5d42ba5cdb3f27e6d3a24c9346f5ad4 100644 (file)
@@ -23,6 +23,30 @@ public enum ConfigurationProperty {
      * Is statistics polling on property type.
      */
     IS_STATISTICS_POLLING_ON,
+    /**
+     * Is table statistics polling on property type.
+     */
+    IS_TABLE_STATISTICS_POLLING_ON,
+    /**
+     * Is flow statistics polling on property type.
+     */
+    IS_FLOW_STATISTICS_POLLING_ON,
+    /**
+     * Is group statistics polling on property type.
+     */
+    IS_GROUP_STATISTICS_POLLING_ON,
+    /**
+     * Is meter statistics polling on property type.
+     */
+    IS_METER_STATISTICS_POLLING_ON,
+    /**
+     * Is port statistics polling on property type.
+     */
+    IS_PORT_STATISTICS_POLLING_ON,
+    /**
+     * Is queue statistics polling on property type.
+     */
+    IS_QUEUE_STATISTICS_POLLING_ON,
     /**
      * Barrier count limit property type.
      */
index 87fe5c2a6e16f9d2569349d2ebcb34d05b1e9d1b..8be0d43b7d3995c042edf65989f31ada759aabe6 100644 (file)
@@ -47,6 +47,48 @@ module openflow-provider-config {
 
         leaf is-statistics-polling-on {
             description "If enabled, periodic statistics gathering will be
+                turned on. If false takes precedence over the per-capability configuration.";
+            type boolean;
+            default "true";
+        }
+
+        leaf is-table-statistics-polling-on {
+            description "If enabled, periodic table statistics gathering will be
+                turned on";
+            type boolean;
+            default "true";
+        }
+
+        leaf is-flow-statistics-polling-on {
+            description "If enabled, periodic flow statistics gathering will be
+                turned on";
+            type boolean;
+            default "true";
+        }
+
+        leaf is-group-statistics-polling-on {
+            description "If enabled, periodic group statistics gathering will be
+                turned on";
+            type boolean;
+            default "true";
+        }
+
+        leaf is-meter-statistics-polling-on {
+            description "If enabled, periodic meter statistics gathering will be
+                turned on";
+            type boolean;
+            default "true";
+        }
+
+        leaf is-port-statistics-polling-on {
+            description "If enabled, periodic port statistics gathering will be
+                turned on";
+            type boolean;
+            default "true";
+        }
+
+        leaf is-queue-statistics-polling-on {
+            description "If enabled, periodic queue statistics gathering will be
                 turned on";
             type boolean;
             default "true";
index f62fd85b7354bbbf24f8afcf0e2f4951fb0d9bda..ed72352a71964ec8f7a8df667e2d5b0a7d25ab0a 100644 (file)
 #
 # is-statistics-polling-on=true
 
+#
+# If enabled, periodic statistics gathering will be turned on for the given capability
+#
+# is-table-statistics-polling-on=true
+# is-flow-statistics-polling-on=true
+# is-group-statistics-polling-on=true
+# is-meter-statistics-polling-on=true
+# is-port-statistics-polling-on=true
+# is-queue-statistics-polling-on=true
+
 #
 # Expose backward compatible statistics RPCs providing result in form of
 # asynchronous notification. This is deprecated, use direct statistics instead.
index afae1caba1ce228bfb45424e0d7ecd3b546cc0e5..15ef52d6941c7f31b0403a3c70cf8d1b37751d20 100644 (file)
@@ -68,6 +68,18 @@ public class ConfigurationServiceFactoryImpl implements ConfigurationServiceFact
                             providerConfig.getEchoReplyTimeout().getValue().toString())
                     .put(ConfigurationProperty.IS_STATISTICS_POLLING_ON.toString(),
                             providerConfig.isIsStatisticsPollingOn().toString())
+                    .put(ConfigurationProperty.IS_TABLE_STATISTICS_POLLING_ON.toString(),
+                            providerConfig.isIsTableStatisticsPollingOn().toString())
+                    .put(ConfigurationProperty.IS_FLOW_STATISTICS_POLLING_ON.toString(),
+                            providerConfig.isIsFlowStatisticsPollingOn().toString())
+                    .put(ConfigurationProperty.IS_GROUP_STATISTICS_POLLING_ON.toString(),
+                            providerConfig.isIsGroupStatisticsPollingOn().toString())
+                    .put(ConfigurationProperty.IS_METER_STATISTICS_POLLING_ON.toString(),
+                            providerConfig.isIsMeterStatisticsPollingOn().toString())
+                    .put(ConfigurationProperty.IS_PORT_STATISTICS_POLLING_ON.toString(),
+                            providerConfig.isIsPortStatisticsPollingOn().toString())
+                    .put(ConfigurationProperty.IS_QUEUE_STATISTICS_POLLING_ON.toString(),
+                            providerConfig.isIsQueueStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.SKIP_TABLE_FEATURES.toString(),
                             providerConfig.isSkipTableFeatures().toString())
                     .put(ConfigurationProperty.BASIC_TIMER_DELAY.toString(),
index e91cef4059c1cc29f58fb470a0c878e9750fc119..955bcec6db080f2aed52724f09b181be87711c13 100644 (file)
@@ -47,6 +47,37 @@ public class OpenFlowProviderConfigImpl implements OpenflowProviderConfig {
         return service.getProperty(ConfigurationProperty.IS_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
     }
 
+    @Override
+    public Boolean isIsTableStatisticsPollingOn() {
+        return service.getProperty(ConfigurationProperty.IS_TABLE_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
+    }
+
+    @Override
+    public Boolean isIsFlowStatisticsPollingOn() {
+        return service.getProperty(ConfigurationProperty.IS_FLOW_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
+    }
+
+    @Override
+    public Boolean isIsGroupStatisticsPollingOn() {
+        return service.getProperty(ConfigurationProperty.IS_GROUP_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
+    }
+
+    @Override
+    public Boolean isIsMeterStatisticsPollingOn() {
+        return service.getProperty(ConfigurationProperty.IS_METER_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
+    }
+
+    @Override
+    public Boolean isIsQueueStatisticsPollingOn() {
+        return service.getProperty(ConfigurationProperty.IS_QUEUE_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
+    }
+
+    @Override
+    public Boolean isIsPortStatisticsPollingOn() {
+        return service.getProperty(ConfigurationProperty.IS_PORT_STATISTICS_POLLING_ON.toString(), Boolean::valueOf);
+    }
+
+
     @Override
     public Boolean isIsStatisticsRpcEnabled() {
         return service.getProperty(ConfigurationProperty.IS_STATISTICS_RPC_ENABLED.toString(), Boolean::valueOf);
index 84807763f985514c444b7984f20bb7d777aade86..f2246d01fd818837f322413f475fdf3b399707fe 100644 (file)
@@ -45,6 +45,7 @@ import org.opendaylight.openflowplugin.impl.statistics.services.dedicated.Statis
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,6 +63,7 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
     private final MultipartWriterProvider statisticsWriterProvider;
     private final DeviceInfo deviceInfo;
     private final TimeCounter timeCounter = new TimeCounter();
+    private final OpenflowProviderConfig config;
     private final long statisticsPollingInterval;
     private final long maximumPollingDelay;
     private final boolean isUsingReconciliationFramework;
@@ -76,17 +78,19 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
     StatisticsContextImpl(@Nonnull final DeviceContext deviceContext,
                           @Nonnull final ConvertorExecutor convertorExecutor,
                           @Nonnull final MultipartWriterProvider statisticsWriterProvider,
-                          @Nonnull final ListeningExecutorService executorService, boolean isStatisticsPollingOn,
-                          boolean isUsingReconciliationFramework, long statisticsPollingInterval,
-                          long maximumPollingDelay) {
+                          @Nonnull final ListeningExecutorService executorService,
+                          @Nonnull final OpenflowProviderConfig config,
+                          boolean isStatisticsPollingOn,
+                          boolean isUsingReconciliationFramework) {
         this.deviceContext = deviceContext;
         this.devState = Preconditions.checkNotNull(deviceContext.getDeviceState());
         this.executorService = executorService;
         this.isStatisticsPollingOn = isStatisticsPollingOn;
+        this.config = config;
         this.convertorExecutor = convertorExecutor;
         this.deviceInfo = deviceContext.getDeviceInfo();
-        this.statisticsPollingInterval = statisticsPollingInterval;
-        this.maximumPollingDelay = maximumPollingDelay;
+        this.statisticsPollingInterval = config.getBasicTimerDelay().getValue();
+        this.maximumPollingDelay = config.getMaximumTimerDelay().getValue();
         this.statisticsWriterProvider = statisticsWriterProvider;
         this.isUsingReconciliationFramework = isUsingReconciliationFramework;
 
@@ -151,29 +155,29 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
     public void instantiateServiceInstance() {
         final List<MultipartType> statListForCollecting = new ArrayList<>();
 
-        if (devState.isTableStatisticsAvailable()) {
+        if (devState.isTableStatisticsAvailable() && config.isIsTableStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPTABLE);
         }
 
-        if (devState.isGroupAvailable()) {
+        if (devState.isGroupAvailable() && config.isIsGroupStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPGROUPDESC);
             statListForCollecting.add(MultipartType.OFPMPGROUP);
         }
 
-        if (devState.isMetersAvailable()) {
+        if (devState.isMetersAvailable() && config.isIsMeterStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPMETERCONFIG);
             statListForCollecting.add(MultipartType.OFPMPMETER);
         }
 
-        if (devState.isFlowStatisticsAvailable()) {
+        if (devState.isFlowStatisticsAvailable() && config.isIsFlowStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPFLOW);
         }
 
-        if (devState.isPortStatisticsAvailable()) {
+        if (devState.isPortStatisticsAvailable() && config.isIsPortStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPPORTSTATS);
         }
 
-        if (devState.isQueueStatisticsAvailable()) {
+        if (devState.isQueueStatisticsAvailable() && config.isIsQueueStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPQUEUE);
         }
 
index 1a1801520f0cfb475b3d72a961a275bc93f05914..2a38430845f5d6009ebde3280164cc3c136f6b74 100644 (file)
@@ -77,7 +77,7 @@ public class StatisticsManagerImpl implements StatisticsManager, StatisticsManag
                 switch (targetWorkMode) {
                     case COLLECTALL:
                         context.enableGathering();
-                        // FIXME: is it a genuine fall through or an error?
+                        break;
                     case FULLYDISABLED:
                         context.disableGathering();
                         break;
@@ -107,10 +107,9 @@ public class StatisticsManagerImpl implements StatisticsManager, StatisticsManag
                 converterExecutor,
                 statisticsWriterProvider,
                 executorService,
+                config,
                 !isStatisticsFullyDisabled && config.isIsStatisticsPollingOn(),
-                useReconciliationFramework,
-                config.getBasicTimerDelay().getValue(),
-                config.getMaximumTimerDelay().getValue());
+                useReconciliationFramework);
 
         contexts.put(deviceContext.getDeviceInfo(), statisticsContext);
         return statisticsContext;
index 46cdece6b75f8990221c1f45cfa76436dae6a93d..a18da729a05c87dd82f15ed9dd4c3a6818d72733 100644 (file)
@@ -37,7 +37,7 @@ import org.osgi.service.cm.ConfigurationAdmin;
 
 @RunWith(MockitoJUnitRunner.class)
 public class ConfigurationServiceFactoryImplTest {
-    private static final int CONFIG_PROP_COUNT = 16;
+    private static final int CONFIG_PROP_COUNT = 22;
     private static final boolean IS_STATISTICS_POLLING_ON = true;
     private static final int BARRIER_COUNT_LIMIT = 2000;
     private static final long BARRIER_INTERVAL_TIMEOUT_LIMIT = 3000;
@@ -79,6 +79,13 @@ public class ConfigurationServiceFactoryImplTest {
     @Before
     public void setUp() throws Exception {
         when(config.isIsStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsFlowStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsTableStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsFlowStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsGroupStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsMeterStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsQueueStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.isIsPortStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
         when(config.getBarrierCountLimit()).thenReturn(new NonZeroUint16Type(BARRIER_COUNT_LIMIT));
         when(config.getBarrierIntervalTimeoutLimit()).thenReturn(new NonZeroUint32Type(BARRIER_INTERVAL_TIMEOUT_LIMIT));
         when(config.getEchoReplyTimeout()).thenReturn(new NonZeroUint32Type(ECHO_REPLY_TIMEOUT));
index 6cc5acfb6dc3cae42df9577944b9178d2015a227..d46dad3eeea4a298add46b73c1ffa96738cbf789 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.impl.statistics;
 
 import static com.google.common.util.concurrent.Futures.immediateFuture;
 import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -19,22 +20,29 @@ import com.google.common.util.concurrent.MoreExecutors;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
 import org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProviderFactory;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.NonZeroUint32Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 @RunWith(Parameterized.class)
 public class StatisticsContextImplParamTest extends StatisticsContextImpMockInitiation {
 
+    @Mock
+    private OpenflowProviderConfig config = mock(OpenflowProviderConfig.class);
 
     public StatisticsContextImplParamTest(final boolean isTable, final boolean isFlow,
                                           final boolean isGroup, final boolean isMeter,
@@ -60,6 +68,18 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit
         });
     }
 
+    @Before
+    public void setUp() {
+        Mockito.when(config.isIsTableStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsFlowStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsGroupStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsMeterStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsPortStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsQueueStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(3000L));
+        Mockito.when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(50000L));
+    }
+
     @Test
     public void gatherDynamicDataTest() throws InterruptedException {
 
@@ -76,7 +96,9 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit
                 mockedDeviceContext, convertorManager,
                 MultipartWriterProviderFactory.createDefaultProvider(mockedDeviceContext),
                 MoreExecutors.newDirectExecutorService(),
-                true, false, 3000, 50000);
+                config,
+                true,
+                false);
 
         final ListenableFuture<RpcResult<List<MultipartReply>>> rpcResult = immediateFuture(RpcResultBuilder
                 .success(Collections.<MultipartReply>emptyList()).build());
index 5e0b46f567dacb1e39bc7edf24f310e0450b42a0..509f5ad7b19720586330631b7ad39e0d7e4e55d9 100644 (file)
@@ -22,6 +22,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Matchers;
+import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
@@ -31,6 +32,8 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorM
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.NonZeroUint32Type;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
@@ -44,21 +47,35 @@ public class StatisticsContextImplTest extends StatisticsContextImpMockInitiatio
     private static final Long TEST_XID = 55L;
     private StatisticsContextImpl<MultipartReply> statisticsContext;
     private ConvertorManager convertorManager;
+    @Mock
+    private OpenflowProviderConfig config =
+            Mockito.mock(OpenflowProviderConfig.class);
 
     @Before
     public void setUp() throws Exception {
         convertorManager = ConvertorManagerFactory.createDefaultManager();
         when(mockedDeviceInfo.reserveXidForDeviceMessage()).thenReturn(TEST_XID);
         Mockito.when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
+        Mockito.when(config.isIsTableStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsFlowStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsGroupStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsMeterStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsPortStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.isIsQueueStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(3000L));
+        Mockito.when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(50000L));
+
         initStatisticsContext();
     }
 
     private void initStatisticsContext() {
         statisticsContext = new StatisticsContextImpl<>(mockedDeviceContext, convertorManager,
-                                                        MultipartWriterProviderFactory
-                                                                .createDefaultProvider(mockedDeviceContext),
-                                                        MoreExecutors.newDirectExecutorService(), true, false, 3000,
-                                                        50000);
+                MultipartWriterProviderFactory
+                        .createDefaultProvider(mockedDeviceContext),
+                MoreExecutors.newDirectExecutorService(),
+                config,
+                true,
+                false);
 
         statisticsContext.setStatisticsGatheringService(mockedStatisticsGatheringService);
         statisticsContext.setStatisticsGatheringOnTheFlyService(mockedStatisticsOnFlyGatheringService);
@@ -80,13 +97,13 @@ public class StatisticsContextImplTest extends StatisticsContextImpMockInitiatio
     public void testClose() throws Exception {
         statisticsContext =
                 new StatisticsContextImpl<>(mockedDeviceContext,
-                                            convertorManager,
-                                            MultipartWriterProviderFactory
-                                                    .createDefaultProvider(mockedDeviceContext),
-                                            MoreExecutors.newDirectExecutorService(),
-                                            true,
-                                            false,
-                                            3000,50000);
+                        convertorManager,
+                        MultipartWriterProviderFactory
+                                .createDefaultProvider(mockedDeviceContext),
+                        MoreExecutors.newDirectExecutorService(),
+                        config,
+                        true,
+                        false);
 
         final RequestContext<Object> requestContext = statisticsContext.createRequestContext();
         statisticsContext.close();