We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b54929c commit a1fdefaCopy full SHA for a1fdefa
contrib/pg_tsdtm/tests/transfers.go
@@ -127,6 +127,12 @@ func transfer(id int, wg *sync.WaitGroup) {
127
amount := 1
128
account1 := rand.Intn(N_ACCOUNTS)
129
account2 := rand.Intn(N_ACCOUNTS)
130
+
131
+ if account1 > account2 {
132
+ tmp := account1
133
+ account1 = account2
134
+ account2 = tmp
135
+ }
136
137
exec(src, "update t set v = v - $1 where u=$2", amount, account1)
138
exec(dst, "update t set v = v + $1 where u=$2", amount, account2)
@@ -152,7 +158,7 @@ func transfer(id int, wg *sync.WaitGroup) {
152
158
}
153
159
154
160
155
- fmt.Println("Test completed, performed %d global transactions", nGlobalTrans)
161
+ fmt.Printf("Test completed, performed %d global transactions\n", nGlobalTrans)
156
162
wg.Done()
157
163
164
0 commit comments