Skip to content

Commit

Permalink
Merge pull request #3 from DomPeliniAerospike/main
Browse files Browse the repository at this point in the history
Added fixes for github actions testing
  • Loading branch information
DomPeliniAerospike authored Apr 4, 2024
2 parents 614c047 + efb9823 commit cfcc943
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/aerospike_vector/vectordb_channel_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ async def close(self):
if channelEndpoints.channel:
await channelEndpoints.channel.close()

def getChannel(self) -> grpc.Channel:
def get_channel(self) -> grpc.Channel:
if not self._is_loadbalancer:
discoveredChannels: list[ChannelAndEndpoints] = list(
discovered_channels: list[ChannelAndEndpoints] = list(
self._nodeChannels.values())
if len(discoveredChannels) <= 0:
if len(discovered_channels) <= 0:
return self._seedChannels[0]


# Return a random channel.
channel = random.choice(discoveredChannels).channel
channel = random.choice(discovered_channels).channel
if channel:
return channel

Expand Down
3 changes: 2 additions & 1 deletion tests/test_vector_get_put_exists.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ async def test_vector_put(truncated_vector_client):
namespace="test",
key="example",
record_data={"chocolate": [0 for i in range(1024)]},

)


Expand All @@ -11,7 +12,7 @@ async def test_vector_get(truncated_vector_client):
namespace="test", key="example", bin_names=["chocolate"]
)
assert result.key.namespace == "test"
assert result.key.set == "demo"
assert result.key.set == ""
assert result.key.key == "example"
assert isinstance(result.key.digest, bytes)
assert result.bins["chocolate"] == [0 for i in range(1024)]
Expand Down
1 change: 0 additions & 1 deletion tests/test_vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ async def test_vector_search(
binList = []

for j, result in enumerate(results[i]):
print(result)
binList.append(result.bins["unit_test"])
for j, index in enumerate(outside):
vector = base_numpy[index].tolist()
Expand Down

0 comments on commit cfcc943

Please sign in to comment.