kwargs[parm] = port return action, kwargs """ callback to modify API call, used during test generation Chooses the packetid parameter, to """ def generateCallCallback(action, kwargs): # constrain the selection of packet ids to a valid sequence if action.getName() in ["publish", "subscribe", "unsubscribe"]: if action.getName() != "publish" or kwargs["qos"] > 0: kwargs["packetid"] = state.clientlist[ kwargs["sockid"]].getNextMsgid() return action, kwargs mbt.model.callCallback = generateCallCallback if __name__ == "__main__": stepping = False if len(sys.argv) > 1: stepping = True mbt.run(stepping=stepping)
for parm in kwargs.keys(): if parm == "hostname": kwargs[parm] = hostname elif parm == "port": kwargs[parm] = port return action, kwargs """ callback to modify API call, used during test generation Chooses the packetid parameter, to """ def generateCallCallback(action, kwargs): # constrain the selection of packet ids to a valid sequence if action.getName() in ["publish", "subscribe", "unsubscribe"]: if action.getName() != "publish" or kwargs["qos"] > 0: kwargs["packetid"] = state.clientlist[kwargs["sockid"]].getNextMsgid() return action, kwargs mbt.model.callCallback = generateCallCallback if __name__ == "__main__": stepping = False if len(sys.argv) > 1: stepping = True mbt.run(stepping=stepping)