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

Correct validation path, and increase timeout waiting for servers to come online #141

Merged
merged 2 commits into from
Feb 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/cookies/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exercise.addProcessor(function (mode, callback) {
// compare stdout of solution and submissionexercise = comparestdout(exercise)
exercise = comparestdout(exercise);

// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this
Expand Down
4 changes: 2 additions & 2 deletions exercises/directories/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exercise.addProcessor(function (mode, callback) {
this.solutionStdout = through2();
}

setTimeout(query.bind(this, mode), 500);
setTimeout(query.bind(this, mode), 2000);

process.nextTick(function () {
callback(null, true)
Expand All @@ -60,7 +60,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise)


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this
Expand Down
2 changes: 1 addition & 1 deletion exercises/handling/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise)


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this
Expand Down
2 changes: 1 addition & 1 deletion exercises/hello_hapi/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise)


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this
Expand Down
4 changes: 2 additions & 2 deletions exercises/helping/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exercise.addProcessor(function (mode, callback) {
this.solutionStdout = through2();
}

setTimeout(query.bind(this, mode), 500);
setTimeout(query.bind(this, mode), 2000);

process.nextTick(function () {
callback(null, true);
Expand All @@ -60,7 +60,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise);


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this;
Expand Down
4 changes: 2 additions & 2 deletions exercises/proxies/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exercise.addProcessor(function (mode, callback) {
this.solutionStdout = through2();
}

setTimeout(query.bind(this, mode), 500);
setTimeout(query.bind(this, mode), 2000);

process.nextTick(function () {
callback(null, true)
Expand All @@ -76,7 +76,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise)


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this
Expand Down
2 changes: 1 addition & 1 deletion exercises/routes/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise)


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this
Expand Down
2 changes: 1 addition & 1 deletion exercises/streams/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exercise.addProcessor(function (mode, callback) {
});


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {

Expand Down
4 changes: 2 additions & 2 deletions exercises/uploads/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exercise.addProcessor(function (mode, callback) {
this.solutionStdout = through2();
}

setTimeout(query.bind(this, mode), 500);
setTimeout(query.bind(this, mode), 2000);

process.nextTick(function () {
callback(null, true);
Expand All @@ -60,7 +60,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise);


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {

Expand Down
8 changes: 5 additions & 3 deletions exercises/validation/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,21 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise)


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this

function verify (port, stream) {

var url = 'http://localhost:' + port + '/chickens';

function error (err) {

exercise.emit('fail', 'Error connecting to http://localhost:' + port + ': ' + err.code)
exercise.emit('fail', 'Error connecting to ' + url + ': ' + err.code)
Copy link
Contributor

Choose a reason for hiding this comment

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

nice catch. :)

}

hyperquest.get('http://localhost:' + port + '/')
hyperquest.get(url)
.on('error', error)
.pipe(bl(function (err, data) {

Expand Down
4 changes: 2 additions & 2 deletions exercises/validation_using_joi_object/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exercise.addProcessor(function (mode, callback) {
this.solutionStdout = through2();
}

setTimeout(query.bind(this, mode), 500);
setTimeout(query.bind(this, mode), 2000);

process.nextTick(function () {
callback(null, true);
Expand All @@ -58,7 +58,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise);


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {

Expand Down
4 changes: 2 additions & 2 deletions exercises/views/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exercise.addProcessor(function (mode, callback) {
this.solutionStdout = through2();
}

setTimeout(query.bind(this, mode), 500);
setTimeout(query.bind(this, mode), 2000);

process.nextTick(function () {
callback(null, true);
Expand All @@ -60,7 +60,7 @@ exercise.addProcessor(function (mode, callback) {
exercise = comparestdout(exercise);


// delayed for 500ms to wait for servers to start so we can start
// delayed for 2000ms to wait for servers to start so we can start
// playing with them
function query (mode) {
var exercise = this;
Expand Down