You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/04/01 08:57:24 UTC
[GitHub] [incubator-shardingsphere] yu199195 opened a new pull request
#5034: add Test MetaDataRefreshStrategy.
yu199195 opened a new pull request #5034: add Test MetaDataRefreshStrategy.
URL: https://github.com/apache/incubator-shardingsphere/pull/5034
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull
request #5034: add Test MetaDataRefreshStrategy.
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #5034: add Test MetaDataRefreshStrategy.
URL: https://github.com/apache/incubator-shardingsphere/pull/5034#discussion_r401517425
##########
File path: sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/shardingjdbc/jdbc/refresh/AbstractMetaDataRefreshStrategyTest.java
##########
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.shardingjdbc.jdbc.refresh;
+
+import com.google.common.collect.ImmutableMap;
+import lombok.Getter;
+import org.apache.shardingsphere.shardingjdbc.jdbc.core.context.ShardingRuntimeContext;
+import org.apache.shardingsphere.sql.parser.binder.metadata.column.ColumnMetaData;
+import org.apache.shardingsphere.sql.parser.binder.metadata.index.IndexMetaData;
+import org.apache.shardingsphere.sql.parser.binder.metadata.schema.SchemaMetaData;
+import org.apache.shardingsphere.sql.parser.binder.metadata.table.TableMetaData;
+import org.apache.shardingsphere.underlying.common.config.properties.ConfigurationProperties;
+import org.apache.shardingsphere.underlying.common.metadata.ShardingSphereMetaData;
+import org.junit.Before;
+
+import java.util.Collections;
+import java.util.Properties;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+@Getter
+public abstract class AbstractMetaDataRefreshStrategyTest {
+
+ private ShardingRuntimeContext runtimeContext;
+
+ @Before
+ public void setUp() {
+ runtimeContext = mock(ShardingRuntimeContext.class);
+ when(runtimeContext.getMetaData()).thenReturn(buildMetaData());
+ when(runtimeContext.getProperties()).thenReturn(new ConfigurationProperties(new Properties()));
+ }
+
+ private ShardingSphereMetaData buildMetaData() {
+ return new ShardingSphereMetaData(null, new SchemaMetaData(ImmutableMap.of("t_order",
+ new TableMetaData(Collections.singletonList(new ColumnMetaData("order_id", 1, "String", false, false, false)),
+ Collections.singletonList(new IndexMetaData("index"))))));
+ }
+}
Review comment:
let an empty line at the tail of each file.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coveralls commented on issue #5034: add
Test MetaDataRefreshStrategy.
Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #5034: add Test MetaDataRefreshStrategy.
URL: https://github.com/apache/incubator-shardingsphere/pull/5034#issuecomment-607140090
## Pull Request Test Coverage Report for [Build 10765](https://coveralls.io/builds/29763841)
* **0** of **0** changed or added relevant lines in **0** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.1%**) to **57.275%**
---
| Totals | [](https://coveralls.io/builds/29763841) |
| :-- | --: |
| Change from base [Build 10764](https://coveralls.io/builds/29759718): | 0.1% |
| Covered Lines: | 11687 |
| Relevant Lines: | 20405 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] tristaZero merged pull request #5034:
add Test MetaDataRefreshStrategy.
Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #5034: add Test MetaDataRefreshStrategy.
URL: https://github.com/apache/incubator-shardingsphere/pull/5034
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services