Build a Salon Appointment Scheduler Project Timeout Problem

Tell us what’s happening:

In .freeCodeCamp/test/utils.js there is a #getScriptOutput function which kills the child process in 1 second if it’s not completed.

The environment provided by CodeAlly is not powerful enough to consistency finish running the script that quickly, so this causes tests to fail most of the time, making project completion unachievable.

I’m not doing anything obscene or slow on my environment. In fact, even doing normal SQL queries in the PSQL interactive shell can take anywhere between 1-5 seconds, script aside.

I was only able to pass by modifying the tests to increase the timeout to 10 seconds.

Can the timeout please be increased in general? I’m not sure which repository these are maintained in, so I couldn’t PR it myself. A pointer would be appreciated!

The proposed change:

   setTimeout(() => {
     child.kill();
-  }, 1000);
+  }, 10000);
   const { strdout } = await child;
   return stdout;

Your code so far
N/A

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

Challenge: Build a Salon Appointment Scheduler

Link to the challenge:

1 Like

It might be some intermittent issues on the CodeAlly side, but I haven’t encountered performance issues with this project before. Could you share your code?

Yeah sure, you can find it here.

Though, note that I have passed the test now, just from increasing this timeout. Also others in the forums are reporting similar issues.

There have been posts of individuals either unable to pass, or just spamming Run until eventually, it finished fast enough.

Note that for this user, the same fix resolved the problem for them:

1 Like

This is really helpful, thanks. I’d figured out that tests on the Salon project couldn’t pass because the tests were running too slowly and something was timing out but, if nothing else, you’ve given a really useful workaround!

@moT01 what do you think?

IN Salon Appointment Scheduler You should display a numbered list of the services you offer before the first prompt for input, each with the format #) <service> . For example, 1) cut , where 1 is the service_id. before it tasks get completed mark but start tasks
after i completed all tasks i didn’t get completed mark.