You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/24 09:21:44 UTC

[incubator-eventmesh] branch storage-api updated: [ISSUE #1807] add JDBCStorageConnectorTest for Storage-Connector module

This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch storage-api
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/storage-api by this push:
     new f3cf40e0 [ISSUE #1807] add JDBCStorageConnectorTest for Storage-Connector module
     new 544640e3 Merge pull request #1810 from githublaohu/jdbc-connector-storage
f3cf40e0 is described below

commit f3cf40e0afe64bcab714d24fbbdee408eca3dd3a
Author: githublaohu <23...@qq.com>
AuthorDate: Mon Oct 24 17:16:52 2022 +0800

    [ISSUE #1807] add JDBCStorageConnectorTest for Storage-Connector module
---
 .../storage/jdbc/JDBCStorageConnectorTest.java     | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/src/test/java/org/apache/eventmesh/connector/storage/jdbc/JDBCStorageConnectorTest.java b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/src/test/java/org/apache/eventmesh/connector/storage/jdbc/JDBCStorageConnectorTest.java
new file mode 100644
index 00000000..b6e03579
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/src/test/java/org/apache/eventmesh/connector/storage/jdbc/JDBCStorageConnectorTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.eventmesh.connector.storage.jdbc;
+
+import java.util.Properties;
+
+import org.junit.Test;
+
+public class JDBCStorageConnectorTest  {
+
+	JDBCStorageConnector connector = new JDBCStorageConnector();
+	
+	@Test
+	public void testInit() throws Exception {
+		Properties properties = new Properties();
+		properties.put("url", "jdbc:mysql://127.0.0.1:3306/electron?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull");
+		properties.put("username", "root");
+		properties.put("password", "Ab123123@");
+		properties.put("maxActive", "20");
+		properties.put("maxWait", "10000");
+		connector.init(properties);
+	}
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org