Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Oct 17, 2023
1 parent 83ed10a commit 054b616
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/soroban-rpc/internal/test/simulate_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ func TestSimulateInvokeContractTransactionSucceeds(t *testing.T) {
assert.Len(t, event.Event.Body.V0.Topics, 1)
assert.Equal(t, xdr.ScValTypeScvString, event.Event.Body.V0.Topics[0].Type)
assert.Equal(t, xdr.ScString("auth"), *event.Event.Body.V0.Topics[0].Str)

metrics := getMetrics(test)
require.Contains(t, metrics, "soroban_rpc_json_rpc_request_duration_seconds_count{endpoint=\"simulateTransaction\",status=\"ok\"} 3")
require.Contains(t, metrics, "soroban_rpc_preflight_pool_request_ledger_get_duration_seconds_count{status=\"ok\",type=\"db\"} 3")
Expand Down Expand Up @@ -1122,7 +1121,7 @@ func TestSimulateSystemEvent(t *testing.T) {
require.NoError(t, err)

assert.InDelta(t, 7260, uint32(transactionData.Resources.ReadBytes), 200)
assert.InDelta(t, 45, int64(transactionData.ResourceFee), 10)
assert.InDelta(t, 98339, int64(transactionData.ResourceFee), 10)
assert.InDelta(t, 104, uint32(transactionData.Resources.WriteBytes), 15)
require.GreaterOrEqual(t, len(response.Events), 3)
}

0 comments on commit 054b616

Please sign in to comment.