Skip to content

Commit

Permalink
Revert Postgres connection handling
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva committed Oct 3, 2024
1 parent ffd90fa commit adb9c01
Show file tree
Hide file tree
Showing 3 changed files with 311 additions and 299 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ last_update TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL
var indexName = "create_index_test";
var vectorSize = 1536;

var target = new PostgresMemory(config, new FakeEmbeddingGenerator());
using var target = new PostgresMemory(config, new FakeEmbeddingGenerator());

var tasks = new List<Task>();
for (int i = 0; i < concurrency; i++)
Expand All @@ -96,7 +96,7 @@ public async Task UpsertConcurrencyTest()
var vectorSize = 4;
var indexName = "upsert_test" + Guid.NewGuid().ToString("D");

var target = new PostgresMemory(this.PostgresConfig, new FakeEmbeddingGenerator());
using var target = new PostgresMemory(this.PostgresConfig, new FakeEmbeddingGenerator());

await target.CreateIndexAsync(indexName, vectorSize);

Expand Down
Loading

0 comments on commit adb9c01

Please sign in to comment.