Skip to content

Commit

Permalink
Merge pull request #388 from devsapp/fix/fc-stress-run-time
Browse files Browse the repository at this point in the history
fix: dstress runtime set error
  • Loading branch information
rsonghuster authored Oct 27, 2021
2 parents d96ea6f + 81c6983 commit 61af2c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ export default class FcBaseComponent extends BaseComponent {
};
this.logger.debug(`Using event options: \n${yaml.dump(eventTypeOpts)}`);
} else if (stressOpts?.functionType === 'http') {
if (!argsData?.url) {
this.logger.error('Function type is http, please specify --url');
}
httpTypeOpts = {
url: argsData?.url,
method: argsData?.method,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/component/fc-stress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class FcStress {
args += ` --spawn-rate ${this.stressOpts?.spawnRate}`;
}
if (this.stressOpts?.runningTime) {
args += ` --run-time ${this.stressOpts?.spawnRate}`;
args += ` --run-time ${this.stressOpts?.runningTime}`;
}
if (this.isEventFunctionType()) {
args += ` --service-name ${this.eventTypeOpts?.serviceName} --function-name ${this.eventTypeOpts?.functionName}`;
Expand Down

0 comments on commit 61af2c5

Please sign in to comment.