Skip to content

Commit

Permalink
HHH-14900 No need in tests to shadow the jdbcBatchSize field of Batch…
Browse files Browse the repository at this point in the history
…BuilderImpl extensions
  • Loading branch information
Sanne committed Oct 26, 2021
1 parent aba67cf commit 5ad60c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,10 @@ protected String getBatchBuilderClassName() {
}

public static class TestBatchBuilder extends BatchBuilderImpl {
private int jdbcBatchSize;

@Override
public void setJdbcBatchSize(int jdbcBatchSize) {
this.jdbcBatchSize = jdbcBatchSize;
}

@Override
public Batch buildBatch(BatchKey key, JdbcCoordinator jdbcCoordinator) {
return buildBatchTest( key, jdbcCoordinator, jdbcBatchSize );
return buildBatchTest( key, jdbcCoordinator, getJdbcBatchSize() );
}

protected BatchingBatch buildBatchTest(BatchKey key, JdbcCoordinator jdbcCoordinator, int jdbcBatchSize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,10 @@ protected String getBatchBuilderClassName() {
}

public static class TestBatchBuilder extends BatchBuilderImpl {
private int jdbcBatchSize;

@Override
public void setJdbcBatchSize(int jdbcBatchSize) {
this.jdbcBatchSize = jdbcBatchSize;
}

@Override
public Batch buildBatch(BatchKey key, JdbcCoordinator jdbcCoordinator) {
return buildBatchTest( key, jdbcCoordinator, jdbcBatchSize );
return buildBatchTest( key, jdbcCoordinator, getJdbcBatchSize() );
}

protected BatchingBatch buildBatchTest(BatchKey key, JdbcCoordinator jdbcCoordinator, int jdbcBatchSize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,10 @@ public void addToBatch() {
}

public static class StatsBatchBuilder extends BatchBuilderImpl {
private int jdbcBatchSize;

@Override
public void setJdbcBatchSize(int jdbcBatchSize) {
this.jdbcBatchSize = jdbcBatchSize;
}

@Override
public Batch buildBatch(BatchKey key, JdbcCoordinator jdbcCoordinator) {
return new StatsBatch( key, jdbcCoordinator, jdbcBatchSize );
return new StatsBatch( key, jdbcCoordinator, getJdbcBatchSize() );
}
}
}

0 comments on commit 5ad60c4

Please sign in to comment.