aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module_test.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2020-05-20 14:57:03 -0400
committerJonathan Amsterdam <jba@google.com>2020-05-21 16:06:32 +0000
commit29e65a82241d72d43b809eb5f76f85aaa7777627 (patch)
tree36d3981ec42ea3043d324aabb936096a5bc3e36a /internal/postgres/insert_module_test.go
parent1c2626f1192a0cd5e124ea6f1c5a992519c6703c (diff)
downloadgo-x-pkgsite-29e65a82241d72d43b809eb5f76f85aaa7777627.tar.xz
internal/postgres: insert module with serializable transaction
If an experiment flag is set, use a serializable transaction to insert a module. Change-Id: Ieca2d5ce68f456d48e69b9de6fc3714a130cbca3 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/750955 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Julie Qiu <julieqiu@google.com>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
-rw-r--r--internal/postgres/insert_module_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go
index b76bc59e..1b9532c6 100644
--- a/internal/postgres/insert_module_test.go
+++ b/internal/postgres/insert_module_test.go
@@ -28,7 +28,9 @@ func TestInsertModule(t *testing.T) {
defer cancel()
ctx = experiment.NewContext(ctx,
experiment.NewSet(map[string]bool{
- internal.ExperimentInsertDirectories: true}))
+ internal.ExperimentInsertDirectories: true,
+ internal.ExperimentInsertSerializable: true,
+ }))
for _, test := range []struct {
name string