當前位置: 首頁>>代碼示例>>Golang>>正文


Golang engine.StopStartEngine函數代碼示例

本文整理匯總了Golang中github.com/cgrates/cgrates/engine.StopStartEngine函數的典型用法代碼示例。如果您正苦於以下問題:Golang StopStartEngine函數的具體用法?Golang StopStartEngine怎麽用?Golang StopStartEngine使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了StopStartEngine函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: TestRPCITStartSecondEngine

func TestRPCITStartSecondEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if ral2, err = engine.StopStartEngine(rpcITCfgPath2, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:eloycoto,項目名稱:cgrates,代碼行數:8,代碼來源:rpcclient_it_test.go

示例2: TestSMGStartEngine

// Start CGR Engine
func TestSMGStartEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StopStartEngine(daCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:bhepp,項目名稱:cgrates,代碼行數:9,代碼來源:smg_it_test.go

示例3: TestTPitStartEngine

// Start CGR Engine
func TestTPitStartEngine(t *testing.T) {
	if !*testTP {
		return
	}
	if _, err := engine.StopStartEngine(tpCfgPath, delay); err != nil { // Mongo requires more time to start
		t.Fatal(err)
	}
}
開發者ID:iwada,項目名稱:cgrates,代碼行數:9,代碼來源:tp_it_test.go

示例4: TestCsvITStartEngine

func TestCsvITStartEngine(t *testing.T) {
	if !*testIT {
		return
	}
	if _, err := engine.StopStartEngine(csvCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:eloycoto,項目名稱:cgrates,代碼行數:8,代碼來源:csv_it_test.go

示例5: TestDmtAgentStartEngine

// Start CGR Engine
func TestDmtAgentStartEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StopStartEngine(daCfgPath, 4000); err != nil {
		t.Fatal(err)
	}
}
開發者ID:eloycoto,項目名稱:cgrates,代碼行數:9,代碼來源:dmtagent_it_test.go

示例6: TestCdrsStartMasterEngine

func TestCdrsStartMasterEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StopStartEngine(cdrsMasterCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:bhepp,項目名稱:cgrates,代碼行數:8,代碼來源:cdrs_replication_it_test.go

示例7: TestSMGRplcStartEngine

// Start CGR Engine
func TestSMGRplcStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(smgRplcSlaveCfgPath, *waitRater); err != nil { // Start slave before master
		t.Fatal(err)
	}
	if _, err := engine.StartEngine(smgRplcMasterCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:cgrates,項目名稱:cgrates,代碼行數:9,代碼來源:smgreplc_it_test.go

示例8: TestCDRStatsLclStartEngine

func TestCDRStatsLclStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(cdrstCfgPath, 1000); err != nil {
		t.Fatal(err)
	}
}
開發者ID:eloycoto,項目名稱:cgrates,代碼行數:8,代碼來源:cdrstatsv1_local_test.go

示例9: TestV2CDRsPSQLStartEngine

func TestV2CDRsPSQLStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(cdrsPsqlCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:iwada,項目名稱:cgrates,代碼行數:8,代碼來源:cdrs_psql_local_test.go

示例10: TestTutLocalStartEngine

// Start CGR Engine
func TestTutLocalStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(tutLocalCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:nikbyte,項目名稱:cgrates,代碼行數:9,代碼來源:tutorial_local_test.go

示例11: TestApierV2itStartEngine

// Start CGR Engine
func TestApierV2itStartEngine(t *testing.T) {
	if !*testIT {
		return
	}
	if _, err := engine.StopStartEngine(apierCfgPath, 200); err != nil { // Mongo requires more time to start
		t.Fatal(err)
	}
}
開發者ID:rinor,項目名稱:cgrates,代碼行數:9,代碼來源:apierv2_it_test.go

示例12: TestFlatstoreLclStartEngine

func TestFlatstoreLclStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(flatstoreCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:iwada,項目名稱:cgrates,代碼行數:8,代碼來源:flatstore_local_test.go

示例13: TestSTIStartEngine

// Start CGR Engine
func TestSTIStartEngine(t *testing.T) {
	if !*testSureTax {
		return
	}
	if _, err := engine.StopStartEngine(*configDir, *waitRater); err != nil {
		t.Fatal(err)
	}
}
開發者ID:henrylee2cn,項目名稱:cgrates,代碼行數:9,代碼來源:suretax_it_test.go

示例14: TestTpStartEngine

// Start CGR Engine
func TestTpStartEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	fmt.Printf("Before starting: %v\n", time.Now())
	if _, err := engine.StopStartEngine(tpCfgPath, 1000); err != nil {
		t.Fatal(err)
	}
	fmt.Printf("After starting: %v\n", time.Now())
}
開發者ID:eloycoto,項目名稱:cgrates,代碼行數:11,代碼來源:tp_it_test.go

示例15: TestCDRStatsitStatsPersistence

// Test stats persistence
func TestCDRStatsitStatsPersistence(t *testing.T) {
	time.Sleep(time.Duration(2) * time.Second) // Allow stats to be updated in dataDb
	if _, err := engine.StopStartEngine(cdrstCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
	var err error
	cdrstRpc, err = jsonrpc.Dial("tcp", cdrstCfg.RPCJSONListen) // We connect over JSON so we can also troubleshoot if needed
	if err != nil {
		t.Fatal("Could not connect to rater: ", err.Error())
	}
	var rcvMetrics map[string]float64
	expectedMetrics := map[string]float64{"ASR": 75, "ACD": 15}
	if err := cdrstRpc.Call("CDRStatsV1.GetMetrics", AttrGetMetrics{StatsQueueId: "CDRST4"}, &rcvMetrics); err != nil {
		t.Error("Calling CDRStatsV1.GetMetrics, got error: ", err.Error())
	} else if !reflect.DeepEqual(expectedMetrics, rcvMetrics) {
		t.Errorf("Expecting: %v, received: %v", expectedMetrics, rcvMetrics)
	}
}
開發者ID:cgrates,項目名稱:cgrates,代碼行數:19,代碼來源:cdrstatsv1_it_test.go


注:本文中的github.com/cgrates/cgrates/engine.StopStartEngine函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。