Skip to content

Commit e437163

Browse files
authored
Fixing some test issues (#129295)
* increase the number of retries for apt-get * Update docs/changelog/129295.yaml * try without sudo * increase timeout to see if that fixes it * mention a couple of more tests * try inline option * try inline option * Delete docs/changelog/129295.yaml * bump this too * possibly ok test now
1 parent d98327c commit e437163

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,6 @@ tests:
298298
- class: org.elasticsearch.index.engine.ThreadPoolMergeSchedulerTests
299299
method: testSchedulerCloseWaitsForRunningMerge
300300
issue: https://github.com/elastic/elasticsearch/issues/125236
301-
- class: org.elasticsearch.xpack.security.SecurityRolesMultiProjectIT
302-
method: testUpdatingFileBasedRoleAffectsAllProjects
303-
issue: https://github.com/elastic/elasticsearch/issues/126223
304301
- class: org.elasticsearch.packaging.test.DockerTests
305302
method: test020PluginsListWithNoPlugins
306303
issue: https://github.com/elastic/elasticsearch/issues/126232

test/external-modules/multi-project/src/javaRestTest/java/org/elasticsearch/xpack/security/SecurityRolesMultiProjectIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.io.IOException;
2727
import java.util.Collection;
2828
import java.util.Map;
29+
import java.util.concurrent.TimeUnit;
2930

3031
import static org.hamcrest.Matchers.contains;
3132
import static org.hamcrest.Matchers.containsInAnyOrder;
@@ -132,14 +133,15 @@ public void testUpdatingFileBasedRoleAffectsAllProjects() throws Exception {
132133
assertBusy(() -> {
133134
assertThat(getClusterPrivileges(project1, username1), contains("monitor"));
134135
assertThat(getClusterPrivileges(project2, username2), contains("monitor"));
135-
});
136+
}, 20, TimeUnit.SECONDS); // increasing this to try and solve for a rare failure
137+
136138
rolesFile.update(Resource.fromString(""));
137139

138140
assertBusy(() -> {
139141
// Both projects should automatically reflect that the role has been removed
140142
assertThat(getClusterPrivileges(project1, username1), empty());
141143
assertThat(getClusterPrivileges(project2, username2), empty());
142-
});
144+
}, 20, TimeUnit.SECONDS);
143145
}
144146

145147
private void createUser(ProjectId projectId, String username, String roleName) throws IOException {

x-pack/test/smb-fixture/src/main/java/org/elasticsearch/test/fixtures/smb/SmbTestContainer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ public SmbTestContainer() {
2727
new ImageFromDockerfile("es-smb-fixture").withDockerfileFromBuilder(
2828
builder -> builder.from(DOCKER_BASE_IMAGE)
2929
.env("TZ", "Etc/UTC")
30-
.run("DEBIAN_FRONTEND=noninteractive apt-get update -qqy && apt-get install -qqy tzdata winbind samba ldap-utils")
30+
.run(
31+
"DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=10 update -qqy && apt-get install -qqy tzdata"
32+
+ " winbind samba ldap-utils "
33+
)
3134
.copy("fixture/provision/installsmb.sh", "/fixture/provision/installsmb.sh")
3235
.copy("fixture/certs/ca.key", "/fixture/certs/ca.key")
3336
.copy("fixture/certs/ca.pem", "/fixture/certs/ca.pem")

0 commit comments

Comments
 (0)