Avoid Kafka 0.10 destabilising the Windows build

Closes gh-12963
This commit is contained in:
Andy Wilkinson
2018-04-25 15:03:40 +01:00
parent c78bc0585c
commit df2372cd93

View File

@@ -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");
* you may not use this file except in compliance with the License.
@@ -16,10 +16,13 @@
package org.springframework.boot.autoconfigure.kafka;
import java.io.File;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
@@ -49,6 +52,11 @@ public class KafkaAutoConfigurationIntegrationTests {
private AnnotationConfigApplicationContext context;
@Before
public void doNotRunOnWindows() {
Assume.assumeFalse(isWindows());
}
@After
public void close() {
if (this.context != null) {
@@ -86,6 +94,10 @@ public class KafkaAutoConfigurationIntegrationTests {
return applicationContext;
}
private boolean isWindows() {
return File.separatorChar == '\\';
}
public static class KafkaConfig {
@Bean