-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IGNITE-22670 Added KafkaToIgnite loader tests (#279)
- Loading branch information
Showing
15 changed files
with
749 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...c-ext/src/test/resources/loader/kafka-to-ignite-with-incorrect-partition-distribution.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
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. | ||
--> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | ||
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> | ||
<property name="dataStorageConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataStorageConfiguration"> | ||
<property name="defaultDataRegionConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataRegionConfiguration"> | ||
<property name="cdcEnabled" value="true" /> | ||
<property name="persistenceEnabled" value="true" /> | ||
</bean> | ||
</property> | ||
</bean> | ||
</property> | ||
</bean> | ||
|
||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_CONSUMER_POLL_TIMEOUT" id="consumerPollTimeout" /> | ||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_REQUEST_TIMEOUT" id="requestTimeout" /> | ||
|
||
<bean id="streamer.cfg" class="org.apache.ignite.cdc.kafka.KafkaToIgniteCdcStreamerConfiguration"> | ||
<property name="topic" value="ignite" /> | ||
<property name="metadataTopic" value="ignite-metadata" /> | ||
<property name="kafkaPartsFrom" value="5" /> | ||
<property name="kafkaPartsTo" value="4" /> | ||
<property name="kafkaRequestTimeout" ref="requestTimeout" /> | ||
<property name="kafkaConsumerPollTimeout" ref="consumerPollTimeout" /> | ||
</bean> | ||
|
||
<util:properties id="kafkaProperties" location="loader/kafka.properties" /> | ||
</beans> |
53 changes: 53 additions & 0 deletions
53
modules/cdc-ext/src/test/resources/loader/kafka-to-ignite-with-incorrect-thread-count.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
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. | ||
--> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | ||
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> | ||
<property name="dataStorageConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataStorageConfiguration"> | ||
<property name="defaultDataRegionConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataRegionConfiguration"> | ||
<property name="cdcEnabled" value="true" /> | ||
<property name="persistenceEnabled" value="true" /> | ||
</bean> | ||
</property> | ||
</bean> | ||
</property> | ||
</bean> | ||
|
||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_CONSUMER_POLL_TIMEOUT" id="consumerPollTimeout" /> | ||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_REQUEST_TIMEOUT" id="requestTimeout" /> | ||
|
||
<bean id="streamer.cfg" class="org.apache.ignite.cdc.kafka.KafkaToIgniteCdcStreamerConfiguration"> | ||
<property name="topic" value="ignite" /> | ||
<property name="metadataTopic" value="ignite-metadata" /> | ||
<property name="kafkaPartsFrom" value="0" /> | ||
<property name="kafkaPartsTo" value="16" /> | ||
<property name="kafkaRequestTimeout" ref="requestTimeout" /> | ||
<property name="kafkaConsumerPollTimeout" ref="consumerPollTimeout" /> | ||
<property name="threadCount" value="20" /> | ||
</bean> | ||
|
||
<util:properties id="kafkaProperties" location="loader/kafka.properties" /> | ||
</beans> |
52 changes: 52 additions & 0 deletions
52
modules/cdc-ext/src/test/resources/loader/kafka-to-ignite-with-negative-partition-from.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
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. | ||
--> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | ||
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> | ||
<property name="dataStorageConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataStorageConfiguration"> | ||
<property name="defaultDataRegionConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataRegionConfiguration"> | ||
<property name="cdcEnabled" value="true" /> | ||
<property name="persistenceEnabled" value="true" /> | ||
</bean> | ||
</property> | ||
</bean> | ||
</property> | ||
</bean> | ||
|
||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_CONSUMER_POLL_TIMEOUT" id="consumerPollTimeout" /> | ||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_REQUEST_TIMEOUT" id="requestTimeout" /> | ||
|
||
<bean id="streamer.cfg" class="org.apache.ignite.cdc.kafka.KafkaToIgniteCdcStreamerConfiguration"> | ||
<property name="topic" value="ignite" /> | ||
<property name="metadataTopic" value="ignite-metadata" /> | ||
<property name="kafkaPartsFrom" value="-1" /> | ||
<property name="kafkaPartsTo" value="16" /> | ||
<property name="kafkaRequestTimeout" ref="requestTimeout" /> | ||
<property name="kafkaConsumerPollTimeout" ref="consumerPollTimeout" /> | ||
</bean> | ||
|
||
<util:properties id="kafkaProperties" location="loader/kafka.properties" /> | ||
</beans> |
52 changes: 52 additions & 0 deletions
52
modules/cdc-ext/src/test/resources/loader/kafka-to-ignite-with-negative-partition-to.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
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. | ||
--> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | ||
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> | ||
<property name="dataStorageConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataStorageConfiguration"> | ||
<property name="defaultDataRegionConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataRegionConfiguration"> | ||
<property name="cdcEnabled" value="true" /> | ||
<property name="persistenceEnabled" value="true" /> | ||
</bean> | ||
</property> | ||
</bean> | ||
</property> | ||
</bean> | ||
|
||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_CONSUMER_POLL_TIMEOUT" id="consumerPollTimeout" /> | ||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_REQUEST_TIMEOUT" id="requestTimeout" /> | ||
|
||
<bean id="streamer.cfg" class="org.apache.ignite.cdc.kafka.KafkaToIgniteCdcStreamerConfiguration"> | ||
<property name="topic" value="ignite" /> | ||
<property name="metadataTopic" value="ignite-metadata" /> | ||
<property name="kafkaPartsFrom" value="0" /> | ||
<property name="kafkaPartsTo" value="-1" /> | ||
<property name="kafkaRequestTimeout" ref="requestTimeout" /> | ||
<property name="kafkaConsumerPollTimeout" ref="consumerPollTimeout" /> | ||
</bean> | ||
|
||
<util:properties id="kafkaProperties" location="loader/kafka.properties" /> | ||
</beans> |
53 changes: 53 additions & 0 deletions
53
modules/cdc-ext/src/test/resources/loader/kafka-to-ignite-with-negative-thread-count.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
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. | ||
--> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | ||
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> | ||
<property name="dataStorageConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataStorageConfiguration"> | ||
<property name="defaultDataRegionConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataRegionConfiguration"> | ||
<property name="cdcEnabled" value="true" /> | ||
<property name="persistenceEnabled" value="true" /> | ||
</bean> | ||
</property> | ||
</bean> | ||
</property> | ||
</bean> | ||
|
||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_CONSUMER_POLL_TIMEOUT" id="consumerPollTimeout" /> | ||
<util:constant static-field="org.apache.ignite.cdc.kafka.KafkaToIgniteLoaderTest.TEST_KAFKA_REQUEST_TIMEOUT" id="requestTimeout" /> | ||
|
||
<bean id="streamer.cfg" class="org.apache.ignite.cdc.kafka.KafkaToIgniteCdcStreamerConfiguration"> | ||
<property name="topic" value="ignite" /> | ||
<property name="metadataTopic" value="ignite-metadata" /> | ||
<property name="kafkaPartsFrom" value="0" /> | ||
<property name="kafkaPartsTo" value="16" /> | ||
<property name="kafkaRequestTimeout" ref="requestTimeout" /> | ||
<property name="kafkaConsumerPollTimeout" ref="consumerPollTimeout" /> | ||
<property name="threadCount" value="-4" /> | ||
</bean> | ||
|
||
<util:properties id="kafkaProperties" location="loader/kafka.properties" /> | ||
</beans> |
Oops, something went wrong.