[arvados] created: 2.5.0-179-gc088a40d5

git repository hosting git at public.arvados.org
Mon Feb 20 21:14:57 UTC 2023


        at  c088a40d5a626c42d6779bca10c8a6f84a86f7bc (commit)


commit c088a40d5a626c42d6779bca10c8a6f84a86f7bc
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon Feb 20 16:13:03 2023 -0500

    20138: Avoid timing failures in TestSyncNonCanonicalManifest
    
    See comments for rationale.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/go/arvados/fs_collection_test.go b/sdk/go/arvados/fs_collection_test.go
index e91853c16..a29371b76 100644
--- a/sdk/go/arvados/fs_collection_test.go
+++ b/sdk/go/arvados/fs_collection_test.go
@@ -134,7 +134,13 @@ func (s *CollectionFSSuite) TestSyncNonCanonicalManifest(c *check.C) {
 		"collection": map[string]interface{}{
 			"manifest_text": mtxt}})
 	c.Assert(err, check.IsNil)
-	c.Assert(mtxt, check.Equals, coll.ManifestText)
+	// In order for the rest of the test to work as intended, the API server
+	// needs to retain the file ordering we set manually. We check that here.
+	// We can't check `mtxt == coll.ManifestText` because the API server
+	// might've returned new block signatures if the GET and POST happened in
+	// different seconds.
+	expectPattern := `\./dir1 \S+ 0:3:foo 3:3:bar\n`
+	c.Assert(coll.ManifestText, check.Matches, expectPattern)
 
 	fs, err := coll.FileSystem(s.client, s.kc)
 	c.Assert(err, check.IsNil)
@@ -147,7 +153,7 @@ func (s *CollectionFSSuite) TestSyncNonCanonicalManifest(c *check.C) {
 	var saved Collection
 	err = s.client.RequestAndDecode(&saved, "GET", "arvados/v1/collections/"+coll.UUID, nil, nil)
 	c.Assert(err, check.IsNil)
-	c.Check(saved.ManifestText, check.Equals, mtxt)
+	c.Check(saved.ManifestText, check.Matches, expectPattern)
 }
 
 func (s *CollectionFSSuite) TestHttpFileSystemInterface(c *check.C) {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list