Avoid Kafka 0.10 destabilising the Windows build

Closes gh-12963
pull/13050/head
Andy Wilkinson 7 years ago
parent c78bc0585c
commit df2372cd93

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2016 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -16,10 +16,13 @@
package org.springframework.boot.autoconfigure.kafka; package org.springframework.boot.autoconfigure.kafka;
import java.io.File;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.junit.After; import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.ClassRule; import org.junit.ClassRule;
import org.junit.Test; import org.junit.Test;
@ -49,6 +52,11 @@ public class KafkaAutoConfigurationIntegrationTests {
private AnnotationConfigApplicationContext context; private AnnotationConfigApplicationContext context;
@Before
public void doNotRunOnWindows() {
Assume.assumeFalse(isWindows());
}
@After @After
public void close() { public void close() {
if (this.context != null) { if (this.context != null) {
@ -86,6 +94,10 @@ public class KafkaAutoConfigurationIntegrationTests {
return applicationContext; return applicationContext;
} }
private boolean isWindows() {
return File.separatorChar == '\\';
}
public static class KafkaConfig { public static class KafkaConfig {
@Bean @Bean

Loading…
Cancel
Save