Explorar el Código

check schema consistency before creating tables

Chris Bannister hace 10 años
padre
commit
69ad432e0a
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      common_test.go

+ 5 - 0
common_test.go

@@ -46,6 +46,11 @@ func addSslOptions(cluster *ClusterConfig) *ClusterConfig {
 var initOnce sync.Once
 
 func createTable(s *Session, table string) error {
+	// lets just be really sure
+	if err := s.control.awaitSchemaAgreement(); err != nil {
+		return err
+	}
+
 	if err := s.control.query(table).Close(); err != nil {
 		return err
 	}