Skip to content

Commit

Permalink
Formatting fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
onurkybsi committed Jan 17, 2025
1 parent 03d5657 commit a7d9819
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,13 @@ int getMaxExportBatchSize() {
* {@code logRecordExporter}.
*
* @return a new {@link BatchLogRecordProcessor}.
* @throws IllegalArgumentException if {@code maxExportBatchSize} is greater than {@code maxQueueSize}.
* @throws IllegalArgumentException if {@code maxExportBatchSize} is greater than {@code
* maxQueueSize}.
*/
public BatchLogRecordProcessor build() {
checkArgument(maxExportBatchSize <= maxQueueSize, "maxExportBatchSize must be smaller or equal to maxQueueSize.");
checkArgument(
maxExportBatchSize <= maxQueueSize,
"maxExportBatchSize must be smaller or equal to maxQueueSize.");
return new BatchLogRecordProcessor(
logRecordExporter,
meterProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,16 @@ void builderInvalidConfig() {
() -> BatchLogRecordProcessor.builder(mockLogRecordExporter).setExporterTimeout(null))
.isInstanceOf(NullPointerException.class)
.hasMessage("timeout");
assertThatThrownBy(() -> BatchLogRecordProcessor.builder(mockLogRecordExporter).setMaxQueueSize(0))
assertThatThrownBy(
() -> BatchLogRecordProcessor.builder(mockLogRecordExporter).setMaxQueueSize(0))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("maxQueueSize must be positive.");
assertThatThrownBy(
() -> BatchLogRecordProcessor.builder(mockLogRecordExporter).setMaxQueueSize(1).setMaxExportBatchSize(2).build())
() ->
BatchLogRecordProcessor.builder(mockLogRecordExporter)
.setMaxQueueSize(1)
.setMaxExportBatchSize(2)
.build())
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("maxExportBatchSize must be smaller or equal to maxQueueSize.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,13 @@ int getMaxExportBatchSize() {
* forwards them to the given {@code spanExporter}.
*
* @return a new {@link BatchSpanProcessor}.
* @throws IllegalArgumentException if {@code maxExportBatchSize} is greater than {@code maxQueueSize}.
* @throws IllegalArgumentException if {@code maxExportBatchSize} is greater than {@code
* maxQueueSize}.
*/
public BatchSpanProcessor build() {
checkArgument(maxExportBatchSize <= maxQueueSize, "maxExportBatchSize must be smaller or equal to maxQueueSize.");
checkArgument(
maxExportBatchSize <= maxQueueSize,
"maxExportBatchSize must be smaller or equal to maxQueueSize.");
return new BatchSpanProcessor(
spanExporter,
exportUnsampledSpans,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ void builderInvalidConfig() {
assertThatThrownBy(() -> BatchSpanProcessor.builder(mockSpanExporter).setMaxQueueSize(0))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("maxQueueSize must be positive.");
assertThatThrownBy(() -> BatchSpanProcessor.builder(mockSpanExporter).setMaxQueueSize(1).setMaxExportBatchSize(2).build())
assertThatThrownBy(
() ->
BatchSpanProcessor.builder(mockSpanExporter)
.setMaxQueueSize(1)
.setMaxExportBatchSize(2)
.build())
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("maxExportBatchSize must be smaller or equal to maxQueueSize.");
}
Expand Down

0 comments on commit a7d9819

Please sign in to comment.