googleapis / googleapis/google-cloud-java

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

Đang mở
#12,058 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: datastore priority: p3 type: bug
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

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 -
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.