pandaapo commented on code in PR #4545: URL: https://github.com/apache/eventmesh/pull/4545#discussion_r1384636548
########## eventmesh-connectors/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/source/connector/RedisSourceConnectorTest.java: ########## @@ -0,0 +1,89 @@ +/* + * 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.redis.source.connector; + +import org.apache.eventmesh.connector.redis.AbstractRedisServer; +import org.apache.eventmesh.connector.redis.cloudevent.CloudEventCodec; +import org.apache.eventmesh.connector.redis.source.config.RedisSourceConfig; +import org.apache.eventmesh.openconnect.offsetmgmt.api.data.ConnectRecord; +import org.apache.eventmesh.openconnect.offsetmgmt.api.data.RecordOffset; +import org.apache.eventmesh.openconnect.offsetmgmt.api.data.RecordPartition; +import org.apache.eventmesh.openconnect.util.CloudEventUtil; +import org.apache.eventmesh.openconnect.util.ConfigUtil; + +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.UUID; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.redisson.Redisson; +import org.redisson.api.RTopic; +import org.redisson.config.Config; + +public class RedisSourceConnectorTest extends AbstractRedisServer { + + private RedisSourceConnector connector; + + private final String expectedMessage = "testRedisMessage"; + + private RTopic topic; + + @BeforeEach + public void setUp() throws Exception { + connector = new RedisSourceConnector(); + RedisSourceConfig sourceConfig = (RedisSourceConfig) ConfigUtil.parse(connector.configClass()); + setupRedisServer(getPortFromUrl(sourceConfig.getConnectorConfig().getServer())); Review Comment: You need shut down the Redis server when the testing is completed. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
