Skip to content

Commit 26aedfb

Browse files
committed
Disabled broken tests that mocks dynamic context
It is nice to have these tests assuming they improve the coverage, however, they should be written without mocks. See the tests in DynamicSqlSourceTest.
1 parent ecee90b commit 26aedfb

File tree

9 files changed

+27
-9
lines changed

9 files changed

+27
-9
lines changed

src/test/java/org/apache/ibatis/scripting/xmltags/ChooseSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -25,6 +25,7 @@
2525

2626
import org.apache.ibatis.domain.blog.Author;
2727
import org.junit.jupiter.api.BeforeEach;
28+
import org.junit.jupiter.api.Disabled;
2829
import org.junit.jupiter.api.Test;
2930

3031
/**
@@ -49,6 +50,7 @@
4950
*
5051
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html#choose-when-otherwise">choose</a>
5152
*/
53+
@Disabled("Broken by #2760")
5254
class ChooseSqlNodeTest extends SqlNodeBase {
5355

5456
private static final String FIRST_TEXT = " AND title like #{title}";

src/test/java/org/apache/ibatis/scripting/xmltags/ForEachSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -26,6 +26,7 @@
2626
import java.util.List;
2727

2828
import org.junit.jupiter.api.BeforeEach;
29+
import org.junit.jupiter.api.Disabled;
2930
import org.junit.jupiter.api.Test;
3031
import org.mockito.ArgumentCaptor;
3132

@@ -44,6 +45,7 @@
4445
*
4546
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html#foreach">foreach</a>
4647
*/
48+
@Disabled("Broken by #2760")
4749
class ForEachSqlNodeTest extends SqlNodeBase {
4850

4951
private SqlNode sqlNode;

src/test/java/org/apache/ibatis/scripting/xmltags/IfSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -24,6 +24,7 @@
2424
import java.util.HashMap;
2525

2626
import org.junit.jupiter.api.BeforeEach;
27+
import org.junit.jupiter.api.Disabled;
2728
import org.junit.jupiter.api.Test;
2829

2930
/**
@@ -37,6 +38,7 @@
3738
*
3839
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html#if">if</a>
3940
*/
41+
@Disabled("Broken by #2760")
4042
class IfSqlNodeTest extends SqlNodeBase {
4143

4244
private static final String CONDITION = "title != null";

src/test/java/org/apache/ibatis/scripting/xmltags/MixedSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -20,11 +20,13 @@
2020
import java.util.Arrays;
2121

2222
import org.junit.jupiter.api.BeforeEach;
23+
import org.junit.jupiter.api.Disabled;
2324
import org.junit.jupiter.api.Test;
2425

2526
/**
2627
* @author <a href="[email protected]">mawen12</a>
2728
*/
29+
@Disabled("Broken by #2760")
2830
class MixedSqlNodeTest extends SqlNodeBase {
2931

3032
private static final String FIRST_TEXT = "abc";

src/test/java/org/apache/ibatis/scripting/xmltags/SetSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -23,6 +23,7 @@
2323
import java.util.HashMap;
2424

2525
import org.junit.jupiter.api.BeforeEach;
26+
import org.junit.jupiter.api.Disabled;
2627
import org.junit.jupiter.api.Test;
2728

2829
/**
@@ -43,6 +44,7 @@
4344
*
4445
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html#trim-where-set">trim-where-set</a>
4546
*/
47+
@Disabled("Broken by #2760")
4648
class SetSqlNodeTest extends SqlNodeBase {
4749

4850
private static final String FIRST_TEXT = " username = #{username},";

src/test/java/org/apache/ibatis/scripting/xmltags/StaticTextSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -18,11 +18,13 @@
1818
import static org.junit.jupiter.api.Assertions.assertTrue;
1919
import static org.mockito.Mockito.verify;
2020

21+
import org.junit.jupiter.api.Disabled;
2122
import org.junit.jupiter.api.Test;
2223

2324
/**
2425
* @author <a href="[email protected]">mawen12</a>
2526
*/
27+
@Disabled("Broken by #2760")
2628
class StaticTextSqlNodeTest extends SqlNodeBase {
2729

2830
private static final String TEXT = "select 1 from dual";

src/test/java/org/apache/ibatis/scripting/xmltags/TextSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -22,11 +22,13 @@
2222

2323
import java.util.HashMap;
2424

25+
import org.junit.jupiter.api.Disabled;
2526
import org.junit.jupiter.api.Test;
2627

2728
/**
2829
* @author <a href="[email protected]">mawen12</a>
2930
*/
31+
@Disabled("Broken by #2760")
3032
class TextSqlNodeTest extends SqlNodeBase {
3133

3234
private static final String TEXT = "select 1 from dual";

src/test/java/org/apache/ibatis/scripting/xmltags/TrimSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -23,6 +23,7 @@
2323
import java.util.HashMap;
2424

2525
import org.junit.jupiter.api.BeforeEach;
26+
import org.junit.jupiter.api.Disabled;
2627
import org.junit.jupiter.api.Test;
2728

2829
/**
@@ -43,6 +44,7 @@
4344
*
4445
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html#trim-where-set">trim-where-set</a>
4546
*/
47+
@Disabled("Broken by #2760")
4648
class TrimSqlNodeTest extends SqlNodeBase {
4749

4850
private static final String FIRST_TEXT = " AND id = #{id}";

src/test/java/org/apache/ibatis/scripting/xmltags/WhereSqlNodeTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 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.
@@ -23,6 +23,7 @@
2323
import java.util.HashMap;
2424

2525
import org.junit.jupiter.api.BeforeEach;
26+
import org.junit.jupiter.api.Disabled;
2627
import org.junit.jupiter.api.Test;
2728

2829
/**
@@ -43,6 +44,7 @@
4344
*
4445
* @see <a href="https://mybatis.org/mybatis-3/dynamic-sql.html#trim-where-set">trim-where-set</a>
4546
*/
47+
@Disabled("Broken by #2760")
4648
class WhereSqlNodeTest extends SqlNodeBase {
4749

4850
private static final String FIRST_TEXT = " AND id = #{id}";

0 commit comments

Comments
 (0)