Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 6112417

Browse files
authored
Merge pull request #1985 from OpenBazaar/eth_fixes_f1720
Fix transaction ordering and enable Tor flag for the qa script
2 parents 007a383 + 47a2e1b commit 6112417

File tree

5 files changed

+41
-66
lines changed

5 files changed

+41
-66
lines changed

Godeps/Godeps.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

qa/eth_escrow_release_after_timeout.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@ def run_test(self):
204204
if resp["state"] != "FULFILLED":
205205
raise TestFailure("EthEscrowTimeoutRelease - FAIL: Alice failed to order fulfillment")
206206

207-
for i in range(6):
208-
time.sleep(600)
209-
210207
# Alice attempt to release funds before timeout hit
211208
release = {
212209
"OrderID": orderId,
@@ -216,11 +213,11 @@ def run_test(self):
216213
if r.status_code == 500:
217214
resp = json.loads(r.text)
218215
raise TestFailure("EthEscrowTimeoutRelease - FAIL: Release escrow internal server error %s", resp["reason"])
219-
elif r.status_code != 400:
216+
elif r.status_code != 401:
220217
raise TestFailure("EthEscrowTimeoutRelease - FAIL: Failed to raise error when releasing escrow before timeout")
221218

222219
for i in range(6):
223-
time.sleep(600)
220+
time.sleep(900)
224221

225222
# Alice attempt to release funds again
226223
release = {

qa/test_framework/test_framework.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ def wait_for_init_success(process):
112112
return
113113

114114
def start_node(self, node):
115-
args = [self.binary, "start", "-v", "-d", node["data_dir"], *self.options]
115+
if self.useTor:
116+
args = [self.binary, "start", "--tor", "-v", "-d", node["data_dir"], *self.options]
117+
else:
118+
args = [self.binary, "start", "-v", "-d", node["data_dir"], *self.options]
116119
process = subprocess.Popen(args, stdout=PIPE)
117120
peerId = self.wait_for_start_success(process, node)
118121
node["peerId"] = peerId
@@ -189,11 +192,13 @@ def main(self, options=["--disablewallet", "--testnet", "--disableexchangerates"
189192
parser.add_argument('-d', '--bitcoind', help="the bitcoind binary")
190193
parser.add_argument('-t', '--tempdir', action='store_true', help="temp directory to store the data folders", default="/tmp/")
191194
parser.add_argument('-c', '--cointype', help="cointype to test", default="BTC")
195+
parser.add_argument('-T', '--tor', help="use tor in QA testing", action='store_true')
192196
args = parser.parse_args(sys.argv[1:])
193197
self.binary = args.binary
194198
self.temp_dir = args.tempdir
195199
self.bitcoind = args.bitcoind
196200
self.cointype = args.cointype
201+
self.useTor = args.tor
197202
self.options = options
198203

199204
try:

qa/testdata/eth_listing.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@
156156
{
157157
"name": "Standard",
158158
"bigPrice": "800000000",
159-
"estimatedDelivery": "6-8 days"
159+
"estimatedDelivery": "6-8 days",
160+
"bigAdditionalItemPrice": "100000000"
160161
},
161162
{
162163
"name": "Express",

vendor/github.com/OpenBazaar/go-ethwallet/wallet/wallet.go

Lines changed: 30 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)