diff --git a/extras/hs-test/infra/cpu.go b/extras/hs-test/infra/cpu.go
index 6ba60e5..a168281 100644
--- a/extras/hs-test/infra/cpu.go
+++ b/extras/hs-test/infra/cpu.go
@@ -39,13 +39,6 @@
 	// indexes, not actual cores
 	var minCpu, maxCpu int
 
-	// temporary fix for CpuPinningSuite
-	if strings.Contains(CurrentSpecReport().ContainerHierarchyTexts[0], "CpuPinning") {
-		cpuAllocator.maxContainerCount = 1
-	} else {
-		cpuAllocator.maxContainerCount = 4
-	}
-
 	if c.runningInCi {
 		minCpu = ((c.buildNumber) * c.maxContainerCount * nCpus)
 		maxCpu = ((c.buildNumber + 1) * c.maxContainerCount * nCpus) - 1
diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go
index 41c8d29..ac255b9 100644
--- a/extras/hs-test/infra/hst_suite.go
+++ b/extras/hs-test/infra/hst_suite.go
@@ -47,7 +47,7 @@
 	TestIds           map[string]string
 	CpuAllocator      *CpuAllocatorT
 	CpuContexts       []*CpuContext
-	CpuPerVpp         int
+	CpuCount          int
 	Ppid              string
 	ProcessIndex      string
 	Logger            *log.Logger
@@ -75,11 +75,11 @@
 	if err != nil {
 		Fail("failed to init cpu allocator: " + fmt.Sprint(err))
 	}
-	s.CpuPerVpp = *NConfiguredCpus
+	s.CpuCount = *NConfiguredCpus
 }
 
 func (s *HstSuite) AllocateCpus() []int {
-	cpuCtx, err := s.CpuAllocator.Allocate(len(s.StartedContainers), s.CpuPerVpp)
+	cpuCtx, err := s.CpuAllocator.Allocate(len(s.StartedContainers), s.CpuCount)
 	// using Fail instead of AssertNil to make error message more readable
 	if err != nil {
 		Fail(fmt.Sprint(err))
@@ -105,7 +105,10 @@
 	}
 	s.ResetContainers()
 	s.RemoveVolumes()
-	s.Ip4AddrAllocator.DeleteIpAddresses()
+
+	if s.Ip4AddrAllocator != nil {
+		s.Ip4AddrAllocator.DeleteIpAddresses()
+	}
 }
 
 func (s *HstSuite) SkipIfUnconfiguring() {
@@ -247,11 +250,17 @@
 	}
 }
 
-func (s *HstSuite) SkipIfNotEnoughAvailableCpus(containerCount int, nCpus int) bool {
-	MaxRequestedCpu := (GinkgoParallelProcess() * containerCount * nCpus)
+func (s *HstSuite) SkipIfNotEnoughAvailableCpus() bool {
+	var MaxRequestedCpu int
+
+	if s.CpuAllocator.runningInCi {
+		MaxRequestedCpu = ((s.CpuAllocator.buildNumber + 1) * s.CpuAllocator.maxContainerCount * s.CpuCount)
+	} else {
+		MaxRequestedCpu = (GinkgoParallelProcess() * s.CpuAllocator.maxContainerCount * s.CpuCount)
+	}
 
 	if len(s.CpuAllocator.cpus)-1 < MaxRequestedCpu {
-		s.Skip(fmt.Sprintf("test case cannot allocate requested cpus (%d cpus * %d containers)", nCpus, containerCount))
+		s.Skip(fmt.Sprintf("test case cannot allocate requested cpus (%d cpus * %d containers)", s.CpuCount, s.CpuAllocator.maxContainerCount))
 	}
 
 	return true
diff --git a/extras/hs-test/infra/suite_cpu_pinning.go b/extras/hs-test/infra/suite_cpu_pinning.go
index 629d2da..e829efa 100644
--- a/extras/hs-test/infra/suite_cpu_pinning.go
+++ b/extras/hs-test/infra/suite_cpu_pinning.go
@@ -13,6 +13,7 @@
 
 type CpuPinningSuite struct {
 	HstSuite
+	previousMaxContainerCount int
 }
 
 func RegisterCpuPinningTests(tests ...func(s *CpuPinningSuite)) {
@@ -31,12 +32,22 @@
 
 func (s *CpuPinningSuite) SetupTest() {
 	// Skip if we cannot allocate 3 CPUs for test container
-	s.SkipIfNotEnoughAvailableCpus(1, 3)
-	s.CpuPerVpp = 3
+	s.previousMaxContainerCount = s.CpuAllocator.maxContainerCount
+	s.CpuCount = 3
+	s.CpuAllocator.maxContainerCount = 1
+	s.SkipIfNotEnoughAvailableCpus()
+
 	s.HstSuite.SetupTest()
 	container := s.GetContainerByName(SingleTopoContainerVpp)
 	vpp, err := container.newVppInstance(container.AllocatedCpus)
 	s.AssertNotNil(vpp, fmt.Sprint(err))
+}
+
+func (s *CpuPinningSuite) TearDownTest() {
+	// reset vars
+	s.CpuCount = *NConfiguredCpus
+	s.CpuAllocator.maxContainerCount = s.previousMaxContainerCount
+	s.HstSuite.TearDownTest()
 
 }
 
