mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
format code with maven plugins
This commit is contained in:
@@ -50,8 +50,9 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
|
||||
* @author Ryan Baxter
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = ReactiveSentinelCircuitBreakerIntegrationTest.Application.class, properties = {
|
||||
"spring.cloud.discovery.client.health-indicator.enabled=false" })
|
||||
@SpringBootTest(webEnvironment = RANDOM_PORT,
|
||||
classes = ReactiveSentinelCircuitBreakerIntegrationTest.Application.class,
|
||||
properties = { "spring.cloud.discovery.client.health-indicator.enabled=false" })
|
||||
@DirtiesContext
|
||||
public class ReactiveSentinelCircuitBreakerIntegrationTest {
|
||||
|
||||
@@ -205,4 +206,4 @@ public class ReactiveSentinelCircuitBreakerIntegrationTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,4 +77,4 @@ public class ReactiveSentinelCircuitBreakerTest {
|
||||
.block()).isEqualTo(Arrays.asList("fallback"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,9 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
|
||||
* @author Eric Zhao
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = SentinelCircuitBreakerIntegrationTest.Application.class, properties = {
|
||||
"spring.cloud.discovery.client.health-indicator.enabled=false" })
|
||||
@SpringBootTest(webEnvironment = RANDOM_PORT,
|
||||
classes = SentinelCircuitBreakerIntegrationTest.Application.class,
|
||||
properties = { "spring.cloud.discovery.client.health-indicator.enabled=false" })
|
||||
@DirtiesContext
|
||||
public class SentinelCircuitBreakerIntegrationTest {
|
||||
|
||||
@@ -151,4 +152,4 @@ public class SentinelCircuitBreakerIntegrationTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.Collections;
|
||||
|
||||
import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule;
|
||||
import com.alibaba.csp.sentinel.slots.block.degrade.DegradeRuleManager;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -78,9 +77,9 @@ public class SentinelCircuitBreakerTest {
|
||||
public void testRunWithFallback() {
|
||||
CircuitBreaker cb = new SentinelCircuitBreakerFactory()
|
||||
.create("testSentinelRunWithFallback");
|
||||
assertThat(cb.<String> run(() -> {
|
||||
assertThat(cb.<String>run(() -> {
|
||||
throw new RuntimeException("boom");
|
||||
}, t -> "fallback")).isEqualTo("fallback");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user