Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

test #55

wants to merge 1 commit into from

Conversation

oren-codefresh
Copy link
Contributor

No description provided.

@@ -56,7 +64,19 @@ class FirebaseStepLogger extends BaseStepLogger {
}

_reportLog(message) {
this.stepRef.child('logs').push(message);
this.calls++;
this.stepRef.child('logs').push(message).then((err) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know if you can do: .then((err) =>... . I think if there is an error it will go to the catch

this.calls = 0;
this.fullfilledCalls = 0;
this.errorCalls = 0;
this.on('finished', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to check whether this event for sure means that all logs flushed (I don't think it is related because it is invoked by the user from what I remember)

@@ -107,6 +127,10 @@ class FirebaseStepLogger extends BaseStepLogger {
return new StepNameTransformStream(this.name);
}

awaitLogsFlushed() {
return this.compliationPromise;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This promise can only be resolved once. So because we don't want it to be resolved before the step is finished we need to create it only when the function is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants