Error when activating add-on
You need to indent your call to bpy.ops.wm.modal_test_operator() so it will only be executed when the code as run as a script, which is the case when __name__ == "__main__". Otherwise you're trying to access blend data when the add-on isn't registered, which results in the exception you're seeing. For more information about this topic take a look at this answer by ideasman42. The corrected code is:

if __name__ == "__main__":
    register()
    bpy.ops.wm.modal_test_operator()


The current script won't work though because there is no socketFunction() in modalTest_OT_Operator.