@@ -691,8 +691,11 @@ await client.collections.create({
691691// =======================
692692// ===== All replication settings
693693// =======================
694+ // Connect to a setup with 3 replicas (required for factor: 3)
695+ const replicationClient : WeaviateClient = await weaviate . connectToLocal ( { port : 8180 } )
696+
694697// Clean slate
695- await client . collections . delete ( collectionName )
698+ await replicationClient . collections . delete ( collectionName )
696699
697700/*
698701// START AllReplicationSettings
@@ -702,7 +705,7 @@ import { configure } from 'weaviate-client';
702705*/
703706
704707// START AllReplicationSettings
705- await client . collections . create ( {
708+ await replicationClient . collections . create ( {
706709 name : 'Article' ,
707710 // highlight-start
708711 replication : configure . replication ( {
@@ -720,7 +723,7 @@ await client.collections.create({
720723// END AllReplicationSettings
721724
722725// START UpdateReplicationSettings
723- const articleReplication = client . collections . use ( 'Article' )
726+ const articleReplication = replicationClient . collections . use ( 'Article' )
724727
725728// highlight-start
726729await articleReplication . config . update ( {
@@ -737,6 +740,8 @@ await articleReplication.config.update({
737740 // Test
738741 // TODO NEEDS TEST assert.equal(result.replicationConfig.factor, 3);
739742
743+ await replicationClient . close ( )
744+
740745// ====================
741746// ===== SHARDING =====
742747// ====================
0 commit comments