func main() { if len(os.Args) != 2 { printUsage() return } host := os.Args[1] hd := master.GetDbConnection() client.Debug("Starting server on", host) client.Debug("Press Ctrl-C to stop") master.StartServer(host, hd) waitForInterrupt() }
func TestBasicStartWorker(t *testing.T) { runtime.GOMAXPROCS(2) fmt.Printf("Test: Worker starts up without issues\n") hd := master.GetTestDbConnection() fmt.Printf("got Db connection") master.ResetDb(hd) master.CreateTables(hd) masterhost := port("localhost", 1324) master.StartServer(masterhost, hd) workerhost := port("localhost", 2222) StartServer(workerhost, masterhost) fmt.Printf(" ... Passed\n") }