Skip to content

Commit

Permalink
Split the test cases in ProductShareGenerator to avoid timeout errors (
Browse files Browse the repository at this point in the history
…#521)

Summary:
Pull Request resolved: #521

We have previously seen an oncall task T145020747 that some tests are flaky because they exceed the 600s limit.  We have released a diff D43200388  to reduce the likelihood of this timeout issue and we recommend to extend this solution to other tests that call multiple functions (T145644394).

This diff splits the test cases to reduce the time needed to execute each test case in the ProductShareGenerator.cpp file

Reviewed By: adshastri

Differential Revision: D44389601

fbshipit-source-id: c03a05de3fa304bfc7c196d4d6f4bc64cb4e6e1c
  • Loading branch information
telgamal-1 authored and facebook-github-bot committed Mar 25, 2023
1 parent 5619466 commit 3a91552
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fbpcf/engine/tuple_generator/test/ProductShareGeneratorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ TEST(ProductShareGenerator, testDummyGenerator) {
*factorys[0]),
std::make_unique<insecure::DummyProductShareGeneratorFactory>(
*factorys[1]));
}

TEST(ProductShareGenerator, testDummyIntegerGenerator) {
auto factorys = communication::getInMemoryAgentFactory(2);
testIntegerGenerator(
std::make_unique<insecure::DummyProductShareGeneratorFactory>(
*factorys[0]),
Expand All @@ -132,7 +135,6 @@ TEST(ProductShareGenerator, testDummyGenerator) {

TEST(ProductShareGenerator, testRealGeneratorWithDummyOT) {
auto factorys = communication::getInMemoryAgentFactory(2);

testGenerator(
std::make_unique<ProductShareGeneratorFactory>(
std::make_unique<util::AesPrgFactory>(),
Expand All @@ -144,7 +146,10 @@ TEST(ProductShareGenerator, testRealGeneratorWithDummyOT) {
std::make_unique<oblivious_transfer::insecure::
DummyBidirectionObliviousTransferFactory>(
*factorys[1])));
}

TEST(ProductShareGenerator, testRealIntegerGeneratorWithDummyOT) {
auto factorys = communication::getInMemoryAgentFactory(2);
testIntegerGenerator(
std::make_unique<ProductShareGeneratorFactory>(
std::make_unique<util::AesPrgFactory>(),
Expand Down Expand Up @@ -178,7 +183,10 @@ TEST(ProductShareGenerator, testRealGeneratorWithRealOT) {
*agentFactories.at(1),
oblivious_transfer::createFerretRcotFactory(
kTestExtendedSize, kTestBaseSize, kTestWeight))));
}

TEST(ProductShareGenerator, testRealIntegerGeneratorWithRealOT) {
auto agentFactories = communication::getInMemoryAgentFactory(2);
testIntegerGenerator(
std::make_unique<ProductShareGeneratorFactory>(
std::make_unique<util::AesPrgFactory>(),
Expand Down

0 comments on commit 3a91552

Please sign in to comment.