Skip to content

Commit

Permalink
Change log display level for IT (apache#9819)
Browse files Browse the repository at this point in the history
* Refactor BaseITCase

* Change log display level for IT
  • Loading branch information
terrymanu authored Mar 25, 2021
1 parent 52ff284 commit 09f0727
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public void setSuperPrivilege() {
* @return is empty or not
*/
public boolean isEmpty() {
return administrativePrivilege.getPrivileges().isEmpty()
&& databasePrivilege.getGlobalPrivileges().isEmpty() && databasePrivilege.getSpecificPrivileges().isEmpty();
return administrativePrivilege.getPrivileges().isEmpty() && databasePrivilege.getGlobalPrivileges().isEmpty() && databasePrivilege.getSpecificPrivileges().isEmpty();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ public abstract class BaseITCase {

public static final String NOT_VERIFY_FLAG = "NOT_VERIFY";

@Getter
@OnContainer(name = "adapter")
private ShardingSphereAdapterContainer proxy;

@Getter
@OnContainer(name = "storage", type = ContainerType.STORAGE, hostName = "mysql.db.host")
private ShardingSphereStorageContainer storage;

Expand All @@ -74,7 +72,6 @@ public abstract class BaseITCase {
@ShardingSphereITInject
private String statement;

@Getter
@ShardingSphereITInject
private TestCaseDescription description;

Expand All @@ -84,7 +81,7 @@ public abstract class BaseITCase {
@ShardingSphereITInject
private String parentPath;

private DataSource dataSource;
private DataSource targetDataSource;

static {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
Expand All @@ -99,11 +96,7 @@ protected void initialize() {

@Before
public void createDataSource() {
dataSource = proxy.getDataSource();
}

protected DataSource getTargetDataSource() {
return dataSource;
targetDataSource = proxy.getDataSource();
}

protected String getStatement() throws ParseException {
Expand All @@ -124,8 +117,8 @@ public static void executeInitSQLs() throws IOException, JAXBException, SQLExcep

@After
public final void tearDown() {
if (dataSource instanceof ShardingSphereDataSource) {
((ShardingSphereDataSource) dataSource).getMetaDataContexts().getExecutorEngine().close();
if (targetDataSource instanceof ShardingSphereDataSource) {
((ShardingSphereDataSource) targetDataSource).getMetaDataContexts().getExecutorEngine().close();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.apache.shardingsphere" level="info" additivity="true">
<logger name="org.apache.shardingsphere" level="warn" additivity="true">
<appender-ref ref="console" />
</logger>
</configuration>

0 comments on commit 09f0727

Please sign in to comment.