GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Datastore Testing: Wiping data between tests? · Issue #1292 · googleapis/google-cloud-java

Datastore Testing: Wiping data between tests? #1292

New issue
Copy link
New issue
Copy link
Closed
#1293
Closed
Datastore Testing: Wiping data between tests?#1292
#1293
Copy link
Assignees
mziccard

Description

@mitchhentges
mitchhentges
opened on Sep 29, 2016
Issue body actions

I'm migrating from the App Engine Datastore API to the Cloud Datastore API (so that I can connect to Datastore from a VPS). A happy thing about the previous API is that it didn't spin up a separate emulator process (5+ seconds) when helper.setUp() is called. With the Cloud Datastore API, it's a different model, so it's a little slower.

I don't want to have to entirely restart my Datastore emulator between tests, but I want a clean slate. Can I either:

  • Still have an in-process datastore implementation to test against, which is fast?
  • Clear the remote emulator datastore, so it doesn't need to be fully restarted?

I've looked through LocalDatastoreHelper, DatastoreOptions and Datastore itself, but I can't find any immediately solutions to my problem.

Note: I can't just @After and delete a set of keys, since some tests involve letting Datastore choose the id of an inserted entity

Activity

  1. mitchhentges
    changed the title [-]Datastore Client API: [/-] [+]Datastore Testing: Wiping data between tests?[/+] on Sep 29, 2016
  2. mitchhentges commented on Sep 29, 2016

    @mitchhentges
    mitchhentges
    on Sep 29, 2016
    Author
    More actions

    Fat-fingered ctrl-enter when entering the title, and posted a blank issue. It's all filled out now :)

  3. mziccard commented on Sep 29, 2016

    @mziccard
    mziccard
    on Sep 29, 2016
    Contributor
    More actions

    @mitchhentges Thanks for the report. You are totally right LocalDatastoreHelper is missing a reset() method. I opened #1293 to fix this.

    In the meantime you can reset the emulator yourself by sending a POST request to http://<host>:<port>/reset.

    Reacted by Nishitha
    Reacted by Mitchell Hentges, Blaine Garrett and Vincent G
  4. mziccard
    closed this as completedin #1293on Sep 30, 2016
  5. Edouard360 commented on May 4, 2019

    @Edouard360
    Edouard360
    on May 4, 2019
    More actions

    I get a java.lang.NullPointerException when doing:
    curl -X POST http://localhost:8081/reset
    I'm with version 2.1.0...

    │ Cloud Datastore Emulator │ 2.1.0 │ 18.4 MiB │

    EDIT: Oh I now realize it works with the flag no-store-on-disk:
    gcloud beta emulators datastore start --no-store-on-disk

    Reacted by Balachander, Gert Cuykens, Igor Zinin and MattAgn
  6. gertcuykens commented on Jan 11, 2020

    @gertcuykens
    gertcuykens
    on Jan 11, 2020
    More actions

    Still null pointer exception without flag --no-store-on-disk. Why can't this be a more clear error message?

    Reacted by Brian Quirion and Amir Behnam
  7. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  8. github-actions
    added 2 commits that reference this issue on Aug 9, 2022

    deps: update dependency com.google.api.grpc:proto-google-cloud-pubsub…

    76f886e

    chore(main): release 3.5.0 (#1305)

    974924f
  9. chingor13
    added 2 commits that reference this issue on Jan 6, 2026

    deps: update dependency com.google.cloud:google-cloud-logging to v3.1…

    8adf74b

    chore(main): release 0.131.4-alpha (#1293)

    385b182
  10. chingor13
    added a commit that references this issue on Jan 22, 2026

    test(deps): update dependency com.google.truth:truth to v1.3.0 (#1292)

    8997cbb
  11. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore: update requirements.txt to address dependabot security alerts (g…

    1cdd210
  12. suztomo
    added a commit that references this issue on Mar 30, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    5443b06
  13. lqiu96
    added a commit that references this issue on Apr 1, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    87d59b6
  14. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore(main): release 1.120.19-SNAPSHOT (#1292)

    17e986c

    chore(main): release 1.120.19-SNAPSHOT (#1292)

    690ffc4
  15. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore: Disable CLIRR checks on releas (googleapis#1474) (googleapis#1292

    2893392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.