Last active
August 16, 2021 10:08
-
-
Save cherniag/ae6812bb1a1938b5443a2dd5925c5fc9 to your computer and use it in GitHub Desktop.
ribbon fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def contextsField = ReflectionUtils.findField(SpringClientFactory, "contexts") | |
contextsField.setAccessible(true) | |
def contexts = ReflectionUtils.getField(contextsField, springClientFactory) | |
contexts.clear() | |
def staticServerList = new StaticServerList(new Server("localhost", wireMockPort)) | |
// add services here | |
["service-name"].each { name -> | |
def balancer = springClientFactory.getLoadBalancer(name) | |
balancer.setServerListImpl(staticServerList) | |
balancer.updateListOfServers() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment