Skip to content

Commit df2372c

Browse files
committed
Avoid Kafka 0.10 destabilising the Windows build
Closes gh-12963
1 parent c78bc05 commit df2372c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,10 +16,13 @@
1616

1717
package org.springframework.boot.autoconfigure.kafka;
1818

19+
import java.io.File;
1920
import java.util.concurrent.CountDownLatch;
2021
import java.util.concurrent.TimeUnit;
2122

2223
import org.junit.After;
24+
import org.junit.Assume;
25+
import org.junit.Before;
2326
import org.junit.ClassRule;
2427
import org.junit.Test;
2528

@@ -49,6 +52,11 @@ public class KafkaAutoConfigurationIntegrationTests {
4952

5053
private AnnotationConfigApplicationContext context;
5154

55+
@Before
56+
public void doNotRunOnWindows() {
57+
Assume.assumeFalse(isWindows());
58+
}
59+
5260
@After
5361
public void close() {
5462
if (this.context != null) {
@@ -86,6 +94,10 @@ private AnnotationConfigApplicationContext doLoad(Class<?>[] configs,
8694
return applicationContext;
8795
}
8896

97+
private boolean isWindows() {
98+
return File.separatorChar == '\\';
99+
}
100+
89101
public static class KafkaConfig {
90102

91103
@Bean

0 commit comments

Comments
 (0)