From 7df353d94a84eacdfc0a19ee6db445d95fc57679 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 15 Nov 2024 09:50:01 -0800 Subject: [PATCH] Reduce flakyness of random order test. PiperOrigin-RevId: 696917989 --- .../Reflection/FeatureSetDescriptor.g.cs | 17 ----------------- src/google/protobuf/map_test.inc | 6 +++--- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs diff --git a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs b/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs deleted file mode 100644 index 208ce1fcb6..0000000000 --- a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region Copyright notice and license -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd -#endregion - -namespace Google.Protobuf.Reflection; - -internal sealed partial class FeatureSetDescriptor -{ - // Canonical serialized form of the edition defaults, generated by embed_edition_defaults. - private const string DefaultsBase64 = - "ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; -} diff --git a/src/google/protobuf/map_test.inc b/src/google/protobuf/map_test.inc index df8ce2e411..a87f9dc6df 100644 --- a/src/google/protobuf/map_test.inc +++ b/src/google/protobuf/map_test.inc @@ -1365,9 +1365,9 @@ TEST_F(MapImplTest, SpaceUsed) { bool MapOrderingIsRandom(int a, int b) { bool saw_a_first = false; bool saw_b_first = false; - std::vector> v(50); - for (int i = 0; i < 50; ++i) { - Map& m = v[i]; + std::vector> v; + while (v.size() < 100) { + Map& m = v.emplace_back(); m[a] = 0; m[b] = 0; int32_t first_element = m.begin()->first;