Search in sources :

Example 1 with RateLimitTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep in project mule-migration-assistant by mulesoft.

the class RateLimitTagMigrationStepTestCase method migrateRateLimitTagRateLimitSLA.

@Test
public void migrateRateLimitTagRateLimitSLA() {
    final RateLimitTagMigrationStep step = new RateLimitTagMigrationStep();
    Element element = getRateLimitSLAElement();
    step.execute(element, mock(MigrationReport.class));
    assertThat(element.getParent(), nullValue());
    assertThat(element.getContentSize(), is(0));
}
Also used : RateLimitTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep) Element(org.jdom2.Element) MigrationReport(com.mulesoft.tools.migration.step.category.MigrationReport) Test(org.junit.Test)

Example 2 with RateLimitTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep in project mule-migration-assistant by mulesoft.

the class ThrottlingMigrationTask method getSteps.

@Override
public List<MigrationStep> getSteps() {
    FixedTimeFrameAlgorithmMigrationStep fixedTimeFrameAlgorithmMigrationStep = new FixedTimeFrameAlgorithmMigrationStep();
    fixedTimeFrameAlgorithmMigrationStep.setApplicationModel(getApplicationModel());
    SlaBasedAlgorithmMigrationStep slaBasedAlgorithmMigrationStep = new SlaBasedAlgorithmMigrationStep();
    slaBasedAlgorithmMigrationStep.setApplicationModel(getApplicationModel());
    List<MigrationStep> steps = new ArrayList<>();
    steps.add(fixedTimeFrameAlgorithmMigrationStep);
    steps.add(slaBasedAlgorithmMigrationStep);
    steps.add(new RateLimitTagMigrationStep());
    steps.add(new DelayResponseTagMigrationStep());
    steps.add(new DiscardResponseTagMigrationStep());
    steps.add(new PolicyTagMigrationStep());
    steps.add(new ThrottleTagMigrationStep());
    return steps;
}
Also used : RateLimitTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep) DiscardResponseTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DiscardResponseTagMigrationStep) PolicyTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.PolicyTagMigrationStep) FixedTimeFrameAlgorithmMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.FixedTimeFrameAlgorithmMigrationStep) DelayResponseTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DelayResponseTagMigrationStep) ThrottleTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.ThrottleTagMigrationStep) SlaBasedAlgorithmMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.SlaBasedAlgorithmMigrationStep) MigrationStep(com.mulesoft.tools.migration.step.MigrationStep) RateLimitTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep) DiscardResponseTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DiscardResponseTagMigrationStep) ArrayList(java.util.ArrayList) DelayResponseTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DelayResponseTagMigrationStep) FixedTimeFrameAlgorithmMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.FixedTimeFrameAlgorithmMigrationStep) PolicyTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.PolicyTagMigrationStep) ThrottleTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.ThrottleTagMigrationStep) SlaBasedAlgorithmMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.SlaBasedAlgorithmMigrationStep)

Example 3 with RateLimitTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep in project mule-migration-assistant by mulesoft.

the class RateLimitTagMigrationStepTestCase method migrateRateLimitTagSpikeControlRateLimit.

@Test
public void migrateRateLimitTagSpikeControlRateLimit() {
    final RateLimitTagMigrationStep step = new RateLimitTagMigrationStep();
    Element element = getSpikeControlRateLimitElement();
    step.execute(element, mock(MigrationReport.class));
    assertThat(element.getParent(), nullValue());
    assertThat(element.getContentSize(), is(0));
}
Also used : RateLimitTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep) Element(org.jdom2.Element) MigrationReport(com.mulesoft.tools.migration.step.category.MigrationReport) Test(org.junit.Test)

Aggregations

RateLimitTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.RateLimitTagMigrationStep)3 MigrationReport (com.mulesoft.tools.migration.step.category.MigrationReport)2 Element (org.jdom2.Element)2 Test (org.junit.Test)2 DelayResponseTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DelayResponseTagMigrationStep)1 DiscardResponseTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.DiscardResponseTagMigrationStep)1 FixedTimeFrameAlgorithmMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.FixedTimeFrameAlgorithmMigrationStep)1 PolicyTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.PolicyTagMigrationStep)1 SlaBasedAlgorithmMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.SlaBasedAlgorithmMigrationStep)1 ThrottleTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.throttling.ThrottleTagMigrationStep)1 MigrationStep (com.mulesoft.tools.migration.step.MigrationStep)1 ArrayList (java.util.ArrayList)1