Skip to content

Conversation

@sanjivanipatrax
Copy link
Contributor

This PR adds in all tests that have no dependence on remoteshell.py and http_client.py.

Features added:

  • Added edgeserver.py and code for edge server error handling (client/src/cbltest/api/edgeserver.py and, client/src/cbltest/api/error.py).
  • Modified existing code to parse edge server info from config files (client/src/cbltest/__init__.py and, client/src/cbltest/configparser.py).
  • Phase 1 of tests as marked in the spreadsheet (test_blobs.py, test_crud.py, and test_ttl_expires.py).
  • Images needed by test_blobs.py (in dataset/edge-server/blobs folder).

@sanjivanipatrax sanjivanipatrax self-assigned this Jan 5, 2026
@sanjivanipatrax sanjivanipatrax marked this pull request as ready for review January 5, 2026 10:58
Copy link
Member

@borrrden borrrden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far none of these look like end to end tests in particular. They test a single edge server for simple functional things. They could easily be handled in the dev tests that happen before the TDK is even reached so if this runtime is long they should be migrated out. In general the TDK should be for things that can only be achieved with coordination between multiple processes.

That being said, it's good that they are written. The edge server developer testing also has a pytest driven setup for testing a single edge server so it shouldn't be hard to migrate them if the decision is made.

def _create_session(
self, scheme: str, url: str, port: int, auth: Optional[BasicAuth]
) -> ClientSession:
return ClientSession(f"{scheme}{url}:{port}", auth=auth)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method doesn't seem to add anything if it is just one line long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - it’s a one-liner right now, but it keeps ClientSession creation in one place and avoids duplicating the setup logic in init, so we added it

keyspace += f".{scope}"
if collection:
keyspace += f".{collection}"
return keyspace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be simplified as:

".".join((db_name, scope, collection)).rstrip(".")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works, I'll change it

self.mark_test_step(
"Waiting 20 seconds - document should expire based on expires (lower value)"
)
time.sleep(20)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be better as 5 or so. 20 seconds is a long time for a test to sit and wait.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it at 20 seconds to be safe, but we could try 10 seconds - it should still pass reliably even with small network delays

@sanjivanipatrax
Copy link
Contributor Author

So far none of these look like end to end tests in particular. They test a single edge server for simple functional things. They could easily be handled in the dev tests that happen before the TDK is even reached so if this runtime is long they should be migrated out. In general the TDK should be for things that can only be achieved with coordination between multiple processes.

That being said, it's good that they are written. The edge server developer testing also has a pytest driven setup for testing a single edge server so it shouldn't be hard to migrate them if the decision is made.

That’s fair. The end-to-end tests depended on remoteshell.py, so they weren’t included here and will come in the next PR.

@sanjivanipatrax
Copy link
Contributor Author

@borrrden I’ve made the changes you suggested. Since they’re minor, I’m planning to merge - let me know if you want to review them again

@sanjivanipatrax sanjivanipatrax merged commit 38b56cd into main Jan 7, 2026
4 checks passed
@sanjivanipatrax sanjivanipatrax deleted the edge-server-phase1 branch January 7, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants