File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
sharding-core/src/test/java/io/shardingjdbc/core/routing/router Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 27
27
import io .shardingjdbc .core .parsing .parser .sql .dql .DQLStatement ;
28
28
import io .shardingjdbc .core .parsing .parser .sql .dql .select .SelectStatement ;
29
29
import io .shardingjdbc .core .rule .ShardingRule ;
30
+ import org .junit .After ;
30
31
import org .junit .Before ;
31
32
import org .junit .Test ;
32
33
39
40
40
41
public final class DatabaseHintSQLRouterTest {
41
42
43
+ private final HintManager hintManager = HintManager .getInstance ();
44
+
42
45
private DatabaseHintSQLRouter databaseHintSQLRouter ;
43
46
47
+ @ After
48
+ public void tearDown () {
49
+ hintManager .close ();
50
+ }
51
+
44
52
@ Before
45
53
public void setRouterContext () {
46
54
ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration ();
@@ -60,7 +68,6 @@ public void assertParse() {
60
68
61
69
@ Test
62
70
public void assertRoute () {
63
- HintManager hintManager = HintManager .getInstance ();
64
71
hintManager .addDatabaseShardingValue (HintManagerHolder .DB_TABLE_NAME , HintManagerHolder .DB_COLUMN_NAME , 1 );
65
72
assertNotNull (databaseHintSQLRouter .route ("select t from table t" , Collections .emptyList (), new DQLStatement ()));
66
73
}
You can’t perform that action at this time.
0 commit comments