Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pocketbase mobile client and types definitions enhancements" #116

Merged
merged 10 commits into from
Mar 28, 2024

Conversation

phoebus-84
Copy link
Collaborator

  • feat: connet to pocketbase in capacitor framework
  • refactor: pocketbase statements and types

Copy link
Member

@puria puria left a comment

Choose a reason for hiding this comment

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

I trust!

@matteo-cristino
Copy link
Collaborator

I am not totally sure aboutusing connect to pb_address phrase since connect is already a meaningfull token in slangroom. What is this statement doing on the address? Is starting a pb client?
What about maybe something like:

Given I connect to 'pb_address' and start pb client

?
To not create confusion between slangroom statement

@matteo-cristino
Copy link
Collaborator

how to create the plugin plugin with connect can be create with

p.new('connect', 'start pb client', (ctx: PluginContext) => {
  const pb_address = ctx.fetchConnect()[0]
  // the rest of the function
})

@phoebus-84
Copy link
Collaborator Author

how to create the plugin plugin with connect can be create with

p.new('connect', 'start pb client', (ctx: PluginContext) => {
  const pb_address = ctx.fetchConnect()[0]
  // the rest of the function
})

Thanks for this!

@matteo-cristino
Copy link
Collaborator

The error seems to the breaking change on ava in v6.0.0

When tests finish, worker threads or child processes are no
longer exited through proces.exit(). If your test file does not
exit on its own, the test run will time out.

along wiht our redis client that does not disconnect (see redis plugin). But is it a good idea to always connect and disconnect in each statement?

@puria
Copy link
Member

puria commented Mar 26, 2024

along wiht our redis client that does not disconnect (see redis plugin). But is it a good idea to always connect and disconnect in each statement?

teardown/setup have different levels, can be at single test level or at test suite. In databases, sometimes is useful to populate some data and then erase it so you have a clean situation after a succesful test run. Sometimes if the setup is something very expensive (maybe some huge data to load, or some expensive cluster of machines/kubernetes setup), then you chain your test to be serial and do tear down of the service at the very end.

In general in testing unless very slow, resource usage and performance is not the first argument of interest.

In our case I would say that you can open a connection and do the tear down at the end of the @slangroom/redis test-suite

@puria puria merged commit a830672 into main Mar 28, 2024
6 checks passed
@puria puria deleted the pocketbase_refactor branch March 28, 2024 12:14
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