Skip to content

Commit

Permalink
tweak dimension for indexes in collection tests
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-denoble committed Feb 14, 2024
1 parent 535bf5d commit a056f5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class CollectionErrorTest {
private static final String environment = System.getenv("PINECONE_ENVIRONMENT");
private static final String indexName = RandomStringBuilder.build("collection-error-test", 8);
private static final List<String> upsertIds = Arrays.asList("v1", "v2", "v3");
private static final int dimension = 3;
private static final int dimension = 4;
private static final String collectionName = RandomStringBuilder.build("reusable-coll", 8);
private static PineconeControlPlaneClient controlPlaneClient;

Expand Down Expand Up @@ -70,7 +70,7 @@ public void testIndexFromNonExistentCollection() {
try {
CreateIndexRequestSpecPod podSpec = new CreateIndexRequestSpecPod().environment(environment).sourceCollection("non-existent-collection");
CreateIndexRequestSpec spec = new CreateIndexRequestSpec().pod(podSpec);
CreateIndexRequest newCreateIndexRequest = new CreateIndexRequest().name(RandomStringBuilder.build("from-nonexistent-coll", 8)).dimension(3).metric(IndexMetric.COSINE).spec(spec);
CreateIndexRequest newCreateIndexRequest = new CreateIndexRequest().name(RandomStringBuilder.build("from-nonexistent-coll", 8)).dimension(dimension).metric(IndexMetric.COSINE).spec(spec);
controlPlaneClient.createIndex(newCreateIndexRequest);
} catch (PineconeException exception) {
assertTrue(exception.getMessage().contains("Resource non-existent-collection not found"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class CollectionTest {
private static final String namespace = RandomStringBuilder.build("ns", 8);
private static final String apiKey = System.getenv("PINECONE_API_KEY");
private static final String environment = System.getenv("PINECONE_ENVIRONMENT");
private static final int dimension = 3;
private static final int dimension = 4;

@BeforeAll
public static void setUpIndex() throws InterruptedException {
Expand Down

0 comments on commit a056f5c

Please sign in to comment.