Skip to content

Commit 49ebf4e

Browse files
authored
fix: update integration test so it runs successfully. (#155)
* fix: retrieve proftest go package from github * fix: stop using Buffer.fill() in busybench.js * fix: use value zone in integration_test.sh
1 parent db0048c commit 49ebf4e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

handwritten/cloud-profiler/testing/busybench.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ const startTime = Date.now();
2323
function benchmark(durationSeconds) {
2424
var buffer = new Buffer(1e4);
2525
for (var k = 0; k < 1e4; k++) {
26-
buffer.fill(0);
26+
for (var j = 0; j < buffer.length; j++) {
27+
buffer[j] = 0;
28+
}
2729
}
2830
if (Date.now() - startTime < 1000 * durationSeconds) {
2931
setImmediate(() => benchmark(durationSeconds));

handwritten/cloud-profiler/testing/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"text/template"
2626
"time"
2727

28-
"cloud.google.com/go/profiler/proftest"
28+
"github.com/GoogleCloudPlatform/google-cloud-go/profiler/proftest"
2929
"golang.org/x/net/context"
3030
"golang.org/x/oauth2/google"
3131
compute "google.golang.org/api/compute/v1"

handwritten/cloud-profiler/testing/integration_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REPO=$(git config --get remote.origin.url)
1515

1616

1717
export GCLOUD_TESTS_NODEJS_PROJECT_ID="cloud-profiler-e2e"
18-
export GCLOUD_TESTS_NODEJS_ZONE="us-east1-a"
18+
export GCLOUD_TESTS_NODEJS_ZONE="us-east1-b"
1919
export GOOGLE_APPLICATION_CREDENTIALS="${SERVICE_KEY}"
2020

2121
# Move test to go path.

0 commit comments

Comments
 (0)