Skip to content

Commit

Permalink
fix: update texts in descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
orubin committed Dec 17, 2024
1 parent 06c194c commit a384642
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Commands/PollingDiscoveryStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class PollingDiscoveryStatus implements CommandModule {
.option('interval', {
requiresArg: true,
describe:
'Period of time between the end of a timeout period or completion of a discovery status request, and the next request for status. ' +
'The sampling interval between status checks. ' +
'Eg: 60, "2min", "10h", "7d". A numeric value is interpreted as a milliseconds count.',
default: 5000
})
Expand Down
5 changes: 1 addition & 4 deletions src/Discovery/DiscoveryPolling.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ describe('DiscoveryPolling', () => {
new DiscoveryPolling(options, instance(discoveryManagerMock));

// assert
verify(loggerSpy.warn(`Warning: polling interval is too small.`)).once();
verify(
loggerSpy.warn(`The recommended way to set polling interval to 10s.`)
).once();
verify(loggerSpy.warn(`Warning: The minimal value for polling interval is 10 seconds.`)).once();
});
});

Expand Down
3 changes: 1 addition & 2 deletions src/Discovery/DiscoveryPolling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export class DiscoveryPolling implements Polling {

if (this.options.interval) {
if (this.options.interval < this.defaultInterval) {
logger.warn(`Warning: polling interval is too small.`);
logger.warn(`The recommended way to set polling interval to 10s.`);
logger.warn(`Warning: The minimal value for polling interval is 10 seconds.`);
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/Scan/BasePolling.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ describe('BasePolling', () => {
);

// assert
verify(loggerSpy.warn(`Warning: polling interval is too small.`)).once();
verify(
loggerSpy.warn(`The recommended way to set polling interval to 10s.`)
).once();
verify(loggerSpy.warn(`Warning: The minimal value for polling interval is 10 seconds.`)).once();
});
});

Expand Down
3 changes: 1 addition & 2 deletions src/Scan/BasePolling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export class BasePolling implements Polling {

if (this.options.interval) {
if (this.options.interval < this.defaultInterval) {
logger.warn(`Warning: polling interval is too small.`);
logger.warn(`The recommended way to set polling interval to 10s.`);
logger.warn(`Warning: The minimal value for polling interval is 10 seconds.`);
}
}

Expand Down

0 comments on commit a384642

Please sign in to comment.