Failing to add a price to the db isn't a test failure.

Just try again.
This commit is contained in:
John Ralls 2015-09-22 10:05:55 -07:00
parent 4088a91326
commit 782ff9ec5f

View File

@ -715,7 +715,6 @@ gboolean
make_random_pricedb (QofBook *book, GNCPriceDB *db)
{
int num_prices;
gboolean check;
num_prices = get_random_int_in_range (1, 41);
if (num_prices < 1) /* should be impossible */
@ -737,11 +736,9 @@ make_random_pricedb (QofBook *book, GNCPriceDB *db)
return FALSE;
}
check = gnc_pricedb_add_price (db, p);
if (!check)
{
return check;
}
if (!gnc_pricedb_add_price (db, p))
/* probably the same date as another price, just try again. */
++num_prices;
gnc_price_unref (p);
}