<commit_before>/**
 *  userEventTest -- tests system.event
 *  Scene.db:
 *   * Ent 1 : Anything
 */


system.require('unitTests/emTests/helperLibs/util.em');

mTest = new UnitTest('userEventTest');

var numTests = 1;
var finishTest = function() {
    numTests--;
    if (numTests == 0)
        system.killEntity();
};

// Just check a single deferred event
var test1Timeout = system.timeout(
    1,
    function() {
        mTest.fail('Timed out before simple user generated event was executed');
    }
);
system.event(
    function() {
        test1Timeout.clear();
        finishTest();
    }
);<commit_msg>Work around bug with shutdown not proceeding unless initial connections were made by making the very short userEventTest wait until the initial connection is made.<commit_after>/**
 *  userEventTest -- tests system.event
 *  Scene.db:
 *   * Ent 1 : Anything
 */


system.require('unitTests/emTests/helperLibs/util.em');

mTest = new UnitTest('userEventTest');

var numTests = 1;
var finishTest = function() {
    numTests--;
    if (numTests == 0)
        system.killEntity();
};

// Using this because finishing before the initial connection causes
// shutdown problems
system.onPresenceConnected(
    function() {

        // Just check a single deferred event
        var test1Timeout = system.timeout(
            1,
            function() {
                mTest.fail('Timed out before simple user generated event was executed');
            }
        );
        system.event(
            function() {
                test1Timeout.clear();
                finishTest();
            }
        );

    }
);
{'fraction_non_alphanumeric': 0.11419753086419752, 'fraction_numerical': 0.007407407407407408, 'mean_word_length': 2.3561076604554865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5009929', 'n_tokens_mistral': 462, 'n_tokens_neox': 441, 'n_words': 131}