Skip to content

Commit

Permalink
Deflake KeygenHandlerTest.FLAKY_SmokeTest
Browse files Browse the repository at this point in the history
Key generation is a process which inheriently has a long tail. 2048-bit keys
are probably too large to generate on the bots if we expect them to complete in
a reasonable amount of time.

Thus we dial down the modulus size and remove the FLAKEY tag.

BUG=none
TEST=none

http://codereview.chromium.org/2808081/show

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54314 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
agl@chromium.org committed Jul 30, 2010
1 parent 9f0a5df commit 2359c08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net/base/keygen_handler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void AssertValidSignedPublicKeyAndChallenge(const std::string& result,
// just check that it exists and has a reasonable length.
// (It's almost always 590 bytes, but the DER encoding of the random key
// and signature could sometimes be a few bytes different.)
ASSERT_GE(spkac.length(), 580U);
ASSERT_LE(spkac.length(), 600U);
ASSERT_GE(spkac.length(), 200U);
ASSERT_LE(spkac.length(), 300U);

// NOTE:
// The value of |result| can be validated by prefixing 'SPKAC=' to it
Expand All @@ -72,8 +72,8 @@ void AssertValidSignedPublicKeyAndChallenge(const std::string& result,
// openssl asn1parse -inform DER
}

TEST_F(KeygenHandlerTest, FLAKY_SmokeTest) {
KeygenHandler handler(2048, "some challenge");
TEST_F(KeygenHandlerTest, SmokeTest) {
KeygenHandler handler(768, "some challenge");
handler.set_stores_key(false); // Don't leave the key-pair behind
std::string result = handler.GenKeyAndSignChallenge();
LOG(INFO) << "KeygenHandler produced: " << result;
Expand All @@ -90,7 +90,7 @@ class ConcurrencyTestTask : public Task {
}

virtual void Run() {
KeygenHandler handler(2048, "some challenge");
KeygenHandler handler(768, "some challenge");
handler.set_stores_key(false); // Don't leave the key-pair behind.
*result_ = handler.GenKeyAndSignChallenge();
event_->Signal();
Expand Down

0 comments on commit 2359c08

Please sign in to comment.