Skip to content

Commit

Permalink
Merge pull request #5746 from telstra/improvement/migration-java-8-17…
Browse files Browse the repository at this point in the history
…_LinkSpecFix

Link spec fixes.
  • Loading branch information
IvanChupin authored Oct 21, 2024
2 parents de38fc9 + a14aead commit c161e66
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import org.openkilda.functionaltests.extension.tags.Tags
import org.openkilda.functionaltests.helpers.Wrappers
import org.openkilda.functionaltests.helpers.factory.FlowFactory
import org.openkilda.functionaltests.helpers.model.SwitchPortVlan
import org.openkilda.messaging.error.MessageError
import org.openkilda.messaging.info.event.IslInfoData
import org.openkilda.messaging.info.event.SwitchChangeType
import org.openkilda.messaging.payload.flow.FlowState
Expand All @@ -34,7 +33,6 @@ import org.openkilda.northbound.dto.v1.links.LinkParametersDto
import org.openkilda.testing.model.topology.TopologyDefinition.Isl

import org.springframework.beans.factory.annotation.Autowired

import org.springframework.beans.factory.annotation.Value
import org.springframework.web.client.HttpClientErrorException
import spock.lang.See
Expand Down Expand Up @@ -287,7 +285,7 @@ class LinkSpec extends HealthCheckSpecification {
then: "An error is received (400 code)"
def exc = thrown(HttpClientErrorException)
new MissingServletRequestParameterException("Required $itemType parameter \'$item\' is not present").matches(exc)
new MissingServletRequestParameterException("Required request parameter \'$item\' for method parameter type $itemType is not present").matches(exc)
where:
srcSwId | srcSwPort | dstSwId | dstSwPort | item | itemType
Expand Down Expand Up @@ -433,7 +431,7 @@ class LinkSpec extends HealthCheckSpecification {
then: "An error is received (400 code)"
def exc = thrown(HttpClientErrorException)
new MissingServletRequestParameterException("Required $itemType parameter \'$item\' is not present").matches(exc)
new MissingServletRequestParameterException("Required request parameter \'$item\' for method parameter type $itemType is not present").matches(exc)
where:
srcSwId | srcSwPort | dstSwId | dstSwPort | item | itemType
Expand All @@ -448,7 +446,7 @@ class LinkSpec extends HealthCheckSpecification {
def links = northbound.getLinks(srcSwId, srcSwPort, dstSwId, dstSwPort)
then: "The corresponding list of links is returned"
links.each {actualLink ->
links.each { actualLink ->
assert filterLinks(northbound.getAllLinks(), srcSwId, srcSwPort, dstSwId, dstSwPort).find { IslInfoData expectedLink ->
actualLink.source.switchId == expectedLink.source.switchId &&
actualLink.source.portNo == expectedLink.source.portNo &&
Expand Down Expand Up @@ -625,7 +623,7 @@ class LinkSpec extends HealthCheckSpecification {
then: "An error is received (400 code)"
def exc = thrown(HttpClientErrorException)
new MissingServletRequestParameterException("Required $itemType parameter \'$item\' is not present").matches(exc)
new MissingServletRequestParameterException("Required request parameter \'$item\' for method parameter type $itemType is not present").matches(exc)
where:
srcSwId | srcSwPort | dstSwId | dstSwPort | item | itemType
Expand Down Expand Up @@ -684,7 +682,7 @@ class LinkSpec extends HealthCheckSpecification {
antiflap.portUp(isl.srcSwitch.dpId, isl.srcPort)
then: "The link is rediscovered in both directions"
Wrappers.wait(discoveryExhaustedInterval + WAIT_OFFSET*2) {
Wrappers.wait(discoveryExhaustedInterval + WAIT_OFFSET * 2) {
def links = northbound.getAllLinks()
assert islUtils.getIslInfo(links, isl.reversed).get().state == DISCOVERED
assert islUtils.getIslInfo(links, isl).get().state == DISCOVERED
Expand Down

0 comments on commit c161e66

Please sign in to comment.