(schema string)
| 35 | var dc dgraphapi.Cluster |
| 36 | |
| 37 | func setSchema(schema string) { |
| 38 | var err error |
| 39 | for retry := 0; retry < 60; retry++ { |
| 40 | err = client.Alter(context.Background(), &api.Operation{Schema: schema}) |
| 41 | if err == nil { |
| 42 | return |
| 43 | } |
| 44 | time.Sleep(time.Second) |
| 45 | } |
| 46 | panic(fmt.Sprintf("Could not alter schema. Got error %v", err.Error())) |
| 47 | } |
| 48 | |
| 49 | func dropPredicate(pred string) { |
| 50 | err := client.Alter(context.Background(), &api.Operation{ |
no test coverage detected