test: static default grade with 60 million judges & millions of proposals

60 millions judges…
That'll be something!
How 'bout 12 billion?
pull/9/head
Dominique Merle 3 years ago
parent 0319b32887
commit c98551f1db

@ -210,14 +210,17 @@ class MajorityJudgmentDeliberatorTest {
} }
@Test @Test
public void testWithThousandsOfProposals() { @DisplayName("Test static default grade with millions of proposals")
int amountOfProposals = 1337; public void testStaticDefaultWithMillionsOfProposals() {
int amountOfProposals = 13375111;
Integer amountOfJudges = 60000000;
Integer defaultGrade = 0;
DeliberatorInterface mj = new MajorityJudgmentDeliberator(); DeliberatorInterface mj = new MajorityJudgmentDeliberator();
ProposalTallyInterface[] tallies = new ProposalTallyInterface[amountOfProposals]; ProposalTallyInterface[] tallies = new ProposalTallyInterface[amountOfProposals];
for (int i = 0 ; i < amountOfProposals ; i++) { for (int i = 0 ; i < amountOfProposals ; i++) {
tallies[i] = new ProposalTally(new Integer[]{ 0, 2, 1 }); tallies[i] = new ProposalTally(new Integer[]{ 7, 204, 107 });
} }
TallyInterface tally = new TallyWithDefaultGrade(tallies, 3, 0); TallyInterface tally = new TallyWithDefaultGrade(tallies, amountOfJudges, defaultGrade);
ResultInterface result = mj.deliberate(tally); ResultInterface result = mj.deliberate(tally);

Loading…
Cancel
Save