From 7802f1cc9e3476101f042eaa6e304d6b9b68bc69 Mon Sep 17 00:00:00 2001 From: TeoV Date: Tue, 26 Sep 2017 11:28:43 +0300 Subject: [PATCH] Add time.Sleep in tp_it_test.go(import and export methond need more time for reading from disk and writing to disk) --- apier/v1/tp_it_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apier/v1/tp_it_test.go b/apier/v1/tp_it_test.go index 65e9a54e4..a5d7c4f7e 100644 --- a/apier/v1/tp_it_test.go +++ b/apier/v1/tp_it_test.go @@ -29,6 +29,7 @@ import ( "path" "reflect" "testing" + "time" ) var ( @@ -119,6 +120,7 @@ func testTPImportTPFromFolderPath(t *testing.T) { } else if reply != utils.OK { t.Error("Calling ApierV1.ImportTarrifPlanFromFolder got reply: ", reply) } + time.Sleep(time.Duration(2 * time.Second)) } func testTPExportTPToFolder(t *testing.T) { @@ -141,6 +143,7 @@ func testTPExportTPToFolder(t *testing.T) { } else if !reflect.DeepEqual(len(reply.ExportedFiles), len(expectedTPStas.ExportedFiles)) { t.Errorf("Expecting : %+v, received: %+v", len(reply.ExportedFiles), len(expectedTPStas.ExportedFiles)) } + time.Sleep(time.Duration(2 * time.Second)) }