googleapis / googleapis/google-cloud-java

java-datastore: LocalDatastoreHelper is downloading datastore emulator zip every time even when file exists

Ouverte
#12,058 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
api: datastore priority: p3 type: bug
Langage dominant
Java
Étoiles
2.1k
Forks
1.2k
Merge moyen
1 j 23 h
PR mergées (30 j)
154

Description

When the [LocalDatastoreHelper](https://github.com/googleapis/google-cloud-java/blob/main/java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java) is started with `.start()` API it is downloading a 36mb zip file from `http://storage.googleapis.com/gcd/tools/cloud-datastore-emulator-2.3.1.zip` every time even if file already exist locally.

This is due to checksum mismatch at:

https://github.com/googleapis/sdk-platform-java/blob/56aa3438393e1992bb8f688291fb12030ec9bc0e/java-core/google-cloud-core/src/main/java/com/google/cloud/testing/BaseEmulatorHelper.java#L465-L479

The checksum value that LocalDatastoreHelper is passing down is not correct:

https://github.com/googleapis/google-cloud-java/blob/aa2c24982903071ab0408fac4357fb8dd067a3fa/java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java#L68

The actual file checksum is `7c1f5a3276241a8f78cb1a837daaaa47`:

```
> curl http://storage.googleapis.com/gcd/tools/cloud-datastore-emulator-2.3.1.
zip | md5sum
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36.1M 100 36.1M 0 0 8831k 0 0:00:04 0:00:04 --:--:-- 8833k
7c1f5a3276241a8f78cb1a837daaaa47 -
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.