Repository: apache/flink-cdc (Java)

Issue:
[Bug] [sqlserver]  connectMaxRetries and connectionPoolSize params order is  reversed
### Search before asking

- [X] I searched in the [issues](https://github.com/ververica/flink-cdc-connectors/issues) and found nothing similar.


### Flink version

Not related to the Flink version

### Flink CDC version

master

### Database and its version

Not related to the Database version

### Minimal reproduce step

just code pass param error

### What did you expect to see?

connectMaxRetries and connectionPoolSize of SqlServerTableSource keep right order 

### What did you see instead?

connectMaxRetries and connectionPoolSize  of SqlServerTableSource order is reversed

### Anything else?

_No response_

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!


Discussion:

Patch:
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactory.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactory.java
index 3bb0c87a929..37391405358 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactory.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactory.java
@@ -168,8 +168,8 @@ public DynamicTableSource createDynamicTableSource(Context context) {
                 splitMetaGroupSize,
                 fetchSize,
                 connectTimeout,
-                connectionPoolSize,
                 connectMaxRetries,
+                connectionPoolSize,
                 distributionFactorUpper,
                 distributionFactorLower,
                 chunkKeyColumn,
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableSource.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableSource.java
index 735b55219f7..bde6dfbe910 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableSource.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/main/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableSource.java
@@ -130,8 +130,8 @@ public SqlServerTableSource(
         this.splitMetaGroupSize = splitMetaGroupSize;
         this.fetchSize = fetchSize;
         this.connectTimeout = connectTimeout;
-        this.connectionPoolSize = connectionPoolSize;
         this.connectMaxRetries = connectMaxRetries;
+        this.connectionPoolSize = connectionPoolSize;
         this.distributionFactorUpper = distributionFactorUpper;
         this.distributionFactorLower = distributionFactorLower;
         this.chunkKeyColumn = chunkKeyColumn;
@@ -178,8 +178,8 @@ public ScanRuntimeProvider getScanRuntimeProvider(ScanContext scanContext) {
                             .splitMetaGroupSize(splitMetaGroupSize)
                             .fetchSize(fetchSize)
                             .connectTimeout(connectTimeout)
-                            .connectionPoolSize(connectionPoolSize)
                             .connectMaxRetries(connectMaxRetries)
+                            .connectionPoolSize(connectionPoolSize)
                             .distributionFactorUpper(distributionFactorUpper)
                             .distributionFactorLower(distributionFactorLower)
                             .chunkKeyColumn(chunkKeyColumn)
@@ -239,8 +239,8 @@ public DynamicTableSource copy() {
                         splitMetaGroupSize,
                         fetchSize,
                         connectTimeout,
-                        connectionPoolSize,
                         connectMaxRetries,
+                        connectionPoolSize,
                         distributionFactorUpper,
                         distributionFactorLower,
                         chunkKeyColumn,


Test patch:
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactoryTest.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactoryTest.java
index 605cb7ab556..7d9dd57e57f 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactoryTest.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/com/ververica/cdc/connectors/sqlserver/table/SqlServerTableFactoryTest.java
@@ -103,8 +103,8 @@ public void testCommonProperties() {
                         SourceOptions.CHUNK_META_GROUP_SIZE.defaultValue(),
                         SourceOptions.SCAN_SNAPSHOT_FETCH_SIZE.defaultValue(),
                         JdbcSourceOptions.CONNECT_TIMEOUT.defaultValue(),
-                        JdbcSourceOptions.CONNECTION_POOL_SIZE.defaultValue(),
                         JdbcSourceOptions.CONNECT_MAX_RETRIES.defaultValue(),
+                        JdbcSourceOptions.CONNECTION_POOL_SIZE.defaultValue(),
                         JdbcSourceOptions.SPLIT_KEY_EVEN_DISTRIBUTION_FACTOR_UPPER_BOUND
                                 .defaultValue(),
                         JdbcSourceOptions.SPLIT_KEY_EVEN_DISTRIBUTION_FACTOR_LOWER_BOUND
@@ -148,8 +148,8 @@ public void testEnableParallelReadSource() {
                         3000,
                         100,
                         Duration.ofSeconds(45),
-                        JdbcSourceOptions.CONNECTION_POOL_SIZE.defaultValue(),
                         JdbcSourceOptions.CONNECT_MAX_RETRIES.defaultValue(),
+                        JdbcSourceOptions.CONNECTION_POOL_SIZE.defaultValue(),
                         40.5d,
                         0.01d,
                         "testCol",
@@ -187,8 +187,8 @@ public void testOptionalProperties() {
                         SourceOptions.CHUNK_META_GROUP_SIZE.defaultValue(),
                         SourceOptions.SCAN_SNAPSHOT_FETCH_SIZE.defaultValue(),
                         JdbcSourceOptions.CONNECT_TIMEOUT.defaultValue(),
-                        JdbcSourceOptions.CONNECTION_POOL_SIZE.defaultValue(),
                         JdbcSourceOptions.CONNECT_MAX_RETRIES.defaultValue(),
+                        JdbcSourceOptions.CONNECTION_POOL_SIZE.defaultValue(),
                         JdbcSourceOptions.SPLIT_KEY_EVEN_DISTRIBUTION_FACTOR_UPPER_BOUND
                                 .defaultValue(),
                         JdbcSourceOptions.SPLIT_KEY_EVEN_DISTRIBUTION_FACTOR_LOWER_BOUND