Fix event tests

Jessica B. Hamrick 12 years ago
parent 9180004fd1
commit 01ba501b88

@ -249,7 +249,11 @@ define([
var that = this;
var on_success = function (data, status, xhr) {
that.kernel_info(); // get kernel info so we know what state the kernel is in
that.events.trigger('status_busy.Kernel', {kernel: this});
// get kernel info so we know what state the kernel is in
that.kernel_info(function () {
that.events.trigger('status_idle.Kernel', {kernel: this});
});
if (success) {
success(data, status, xhr);
}
@ -380,7 +384,12 @@ define([
*/
Kernel.prototype._kernel_connected = function () {
this.events.trigger('status_connected.Kernel', {kernel: this});
this.kernel_info(); // get kernel info so we know what state the kernel is in
this.events.trigger('status_busy.Kernel', {kernel: this});
// get kernel info so we know what state the kernel is in
var that = this;
this.kernel_info(function () {
that.events.trigger('status_idle.Kernel', {kernel: this});
});
};
/**

@ -197,7 +197,11 @@ casper.notebook_test(function () {
'status_killed.Kernel',
'kernel_started.Kernel',
'status_connected.Kernel',
'status_starting.Kernel',
// technically we should get this message, but sometimes the kernel
// finishes starting before we connect to it so then we don't receive
// this message
//
//'status_starting.Kernel',
'status_busy.Kernel',
'status_idle.Kernel'
],
@ -240,7 +244,11 @@ casper.notebook_test(function () {
'status_restarting.Kernel',
'kernel_started.Kernel',
'status_connected.Kernel',
'status_starting.Kernel',
// technically we should get this message, but sometimes the kernel
// finishes starting before we connect to it so then we don't receive
// this message
//
//'status_starting.Kernel',
'status_busy.Kernel',
'status_idle.Kernel'
],

@ -104,7 +104,11 @@ casper.notebook_test(function () {
[
'kernel_started.Session',
'status_connected.Kernel',
'status_starting.Kernel',
// technically we should get this message, but sometimes the kernel
// finishes starting before we connect to it so then we don't receive
// this message
//
//'status_starting.Kernel',
'status_busy.Kernel',
'status_idle.Kernel'
],
@ -135,7 +139,11 @@ casper.notebook_test(function () {
'status_killed.Session',
'kernel_started.Session',
'status_connected.Kernel',
'status_starting.Kernel',
// technically we should get this message, but sometimes the kernel
// finishes starting before we connect to it so then we don't receive
// this message
//
//'status_starting.Kernel',
'status_busy.Kernel',
'status_idle.Kernel'
],

Loading…
Cancel
Save