Skip to content

Commit

Permalink
[Fix][KuduCatalogFactory]: Fix KuduCatalogFactory.optionRule() will t…
Browse files Browse the repository at this point in the history
…hrow an Exception (apache#6787)

* fix(KuduCatalogFactory): Fix KuduCatalogFactory.optionRule() will throw an Exception

Fix `KuduCatalogFactory.optionRule()` will throw an Exception because conditional OptionRule should be in the optinal or required options.

* [Feat][KuduFactoryTest]: Add a Test On KuduFactory

1. Add a Test On KuduFactory
  • Loading branch information
Jetiaime authored and chaorongzhi committed Aug 21, 2024
1 parent f378d45 commit bb2c982
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public OptionRule optionRule() {
.optional(OPERATION_TIMEOUT)
.optional(ADMIN_OPERATION_TIMEOUT)
.optional(KERBEROS_KRB5_CONF)
.optional(ENABLE_KERBEROS)
.conditional(ENABLE_KERBEROS, true, KERBEROS_PRINCIPAL, KERBEROS_KEYTAB)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.seatunnel.connectors.seatunnel.kudu;

import org.apache.seatunnel.connectors.seatunnel.kudu.catalog.KuduCatalogFactory;
import org.apache.seatunnel.connectors.seatunnel.kudu.sink.KuduSinkFactory;
import org.apache.seatunnel.connectors.seatunnel.kudu.source.KuduSourceFactory;

Expand All @@ -29,5 +30,6 @@ class KuduFactoryTest {
void optionRule() {
Assertions.assertNotNull((new KuduSourceFactory()).optionRule());
Assertions.assertNotNull((new KuduSinkFactory()).optionRule());
Assertions.assertNotNull((new KuduCatalogFactory()).optionRule());
}
}

0 comments on commit bb2c982

Please sign in to comment.