diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index 7d511a567..ebde8ea05 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -183,6 +183,10 @@
Move C module include in test.c above headers included for testing.
+
+ Allow primary gid for the test user to be different from uid.
+
+
Increase timeout in storage/s3 module to improve reliability.
diff --git a/test/lib/pgBackRestTest/Common/ContainerTest.pm b/test/lib/pgBackRestTest/Common/ContainerTest.pm
index ba86c48f1..f67bc0a25 100755
--- a/test/lib/pgBackRestTest/Common/ContainerTest.pm
+++ b/test/lib/pgBackRestTest/Common/ContainerTest.pm
@@ -34,12 +34,12 @@ use constant POSTGRES_GROUP_ID => 5000;
use constant POSTGRES_USER => POSTGRES_GROUP;
use constant POSTGRES_USER_ID => 5000;
-use constant TEST_GROUP => getgrgid($UID) . '';
- push @EXPORT, qw(TEST_GROUP);
-use constant TEST_GROUP_ID => getgrnam(TEST_GROUP) . '';
use constant TEST_USER => getpwuid($UID) . '';
push @EXPORT, qw(TEST_USER);
use constant TEST_USER_ID => $UID;
+use constant TEST_GROUP => getgrgid((getpwnam(TEST_USER))[3]) . '';
+ push @EXPORT, qw(TEST_GROUP);
+use constant TEST_GROUP_ID => getgrnam(TEST_GROUP) . '';
use constant BACKREST_USER => 'pgbackrest';
push @EXPORT, qw(BACKREST_USER);